Thanks!

On Fri, Jul 17, 2009 at 10:42 AM, T.J. Crowder <t...@crowdersoftware.com>wrote:

>
> Hi,
>
> Yeah, bit of a pain that there's no standard way to _remove_ a style
> from the style property entirely.  Setting things to "" is not the
> same thing.
>
> However:  Effects offer beforeStart and afterFinish callbacks, and the
> style property has this nifty cssText property on it, which suggests
> this should work around the problem (and may be a way forward for an
> eventual scripty fix):
>
>    $('target').highlight({
>        beforeStart: function(effect) {
>            effect.saveStyle = effect.element.style.cssText;
>        },
>        afterFinish: function(effect) {
>            effect.element.style.cssText = effect.saveStyle;
>        }
>    });
>
> cssText is fairly widely supported, I believe, even IE6 had it (not
> that :hover works with IE6, except on links).  In fact, Prototype's
> setStyle uses it if you pass in a string (an undocumented feature;
> docs say it has to be an object, so it may not get unit tested).
>
> HTH,
>
> On Jul 17, 2:33 pm, Nicholas Van Weerdenburg <vanwe...@gmail.com>
> wrote:
> > Hi,
> > I found this tickethttp://dev.rubyonrails.org/ticket/6134
> >
> > but the problem still exists.  No matter what I do, Effect.Highlight
> > pollutes the DOM by changing the element background color, breaking css
> > :hover and other style rules due to the element rule css precedence
> >
> > Anyone know of a workaround? I tried :restorecolor=>"" but that doesn't
> > work. Calls to set the background color to "" fail, I think due to the
> > timing of the hightlight.
> >
> > Thanks,
> > Nick
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to