Discussion:
Removing inline styles
Robert
2008-06-27 18:21:38 UTC
Permalink
At the end of my animation, I want to remove the opacity and height
properties from the styling - but using

Dom.setStyle(element, 'opacity', '');

doesn't work for IE, the Filter and Zoom properties are still set -- I
can get around this by combining it with

element.style.zoom = null;
element.style.filter = null; // this results in FILTER: null -- not ideal

I'm curious, is it possible to clear the inline styling somehow with
YUI, Dom.setStyle(element, 'opacity', null) seems like it should be,
any ideas?

Robert


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ydn-javascript/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/ydn-javascript/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:ydn-javascript-digest-***@public.gmane.org
mailto:ydn-javascript-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
ydn-javascript-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Matt Hackett
2008-06-30 08:25:38 UTC
Permalink
Hi Robert,

Not quite sure what you mean. To reset opacity (back to 100%, I
assume), I tried:

YAHOO.util.Dom.setStyle(element, 'opacity', 1);

And that worked fine in standard browsers. What's the issue you're having?

-Matt
http://scriptnode.com/
Post by Robert
At the end of my animation, I want to remove the opacity and height
properties from the styling - but using
Dom.setStyle(element, 'opacity', '');
doesn't work for IE, the Filter and Zoom properties are still set -- I
can get around this by combining it with
element.style.zoom = null;
element.style.filter = null; // this results in FILTER: null -- not ideal
I'm curious, is it possible to clear the inline styling somehow with
YUI, Dom.setStyle(element, 'opacity', null) seems like it should be,
any ideas?
Robert
------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ydn-javascript/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/ydn-javascript/join
(Yahoo! ID required)

<*> To change settings via email:
mailto:ydn-javascript-digest-***@public.gmane.org
mailto:ydn-javascript-fullfeatured-***@public.gmane.org

<*> To unsubscribe from this group, send an email to:
ydn-javascript-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Loading...