ubh
10-09-2008, 03:49 AM
Ok so I am playing with the "motion tween" lib that utilizes FF and IE css opacity's to fade in or out elements.
problem is that if I use DOM to insert my opacity styles:
element.style.opacity="0"; FF
element.style.opacity="alpha(opacity='0')";IE
onto my elements before preforming my fade calls, IE throws an error at me in the middle of the fading:
Line 51
Char: 16
Error:'filters.alpha' is null or not an object
Code: 0
However if I leave the opacity css style inline with out DOM inserting them, then I get no error and everything is fine.
My rock and a hard spot is that if I leave the opacity styles inline on each element then people who have JavaScript turned off will never see my content fade in.
So my question is, am I setting the IE opacity with DOM incorrectly or what?
BTW line 51 is in the actual opacityTween.js lib:
if(t.filters) t.filters.alpha['opacity'] = v;
Here is my site:
http://www.devinrolsen.com
NOTE: the fade in effect is a based on a cookie session so you will only see the fade in effect on the first time you enter the site, unless you delete your cookies (IE also requires you to restart the browser).
Thanks!
problem is that if I use DOM to insert my opacity styles:
element.style.opacity="0"; FF
element.style.opacity="alpha(opacity='0')";IE
onto my elements before preforming my fade calls, IE throws an error at me in the middle of the fading:
Line 51
Char: 16
Error:'filters.alpha' is null or not an object
Code: 0
However if I leave the opacity css style inline with out DOM inserting them, then I get no error and everything is fine.
My rock and a hard spot is that if I leave the opacity styles inline on each element then people who have JavaScript turned off will never see my content fade in.
So my question is, am I setting the IE opacity with DOM incorrectly or what?
BTW line 51 is in the actual opacityTween.js lib:
if(t.filters) t.filters.alpha['opacity'] = v;
Here is my site:
http://www.devinrolsen.com
NOTE: the fade in effect is a based on a cookie session so you will only see the fade in effect on the first time you enter the site, unless you delete your cookies (IE also requires you to restart the browser).
Thanks!