I know this is a long shot because it is a 开发者_如何学Pythonlarge script and I doubt anyone will want to read through all this but here it goes.
I have an animation function that animates the style properties of a list of elements. This function can be found here. Now I know all about cross browser opacity and I can set it manually i.e. I can set the opacity of an element to .5 (50 in IE's case) and it works perfect in every browser. Just when I try to animate my opacity property through my function it does not move.
As you can see in there I have a lot of code just to get IE's method of alpha(opacity=x)
working.
For an example of it please see this fiddle. Sorry about it being so messy. If you click the paragraph tag that says Fade to .5 opacity on click.
in any browser other than IE it will fade to 0, not .5 because I am testing stuff. Now if you click the same tag in IE nothing happens.
I doubt anyone will be able to help with such a complicated and specific problem but any suggestion will be much appreciated.
Looks like you're implementing your opacity logic twice, both in css()
and animate()
. That's bad design IMO no matter how much you're aiming for high performance. Once you fix that, animate()
will be dependant on a working css()
function, and since that works, animate()
will work.
精彩评论