Sean Catchpole wrote:
[ ... ] http://www.sunsean.com/cssAnimate.html [ ... ]
>
I think this is an interesting idea. Perhaps jQuery should apply a
unique class to the elements it's going to animate, then manipulate
the css instead of the dom.
This is an interesting idea. But I see one major stumbling block: the
cascade in Cascading Style Sheets. Manipulating at the DOM level, we
use the top of the chain in CSS. But if we start playing with
stylesheets, we have to be concerned with the specificity [1] of our
selectors. For instance, if you add the following to the stylesheet of
your example:
td.A { opacity:.75;}
then a CSS-comformant browser will not override the opacity when you
change a rule such as
.A { opacity: whatever;}
since "td.A" has a higher specificity than ".A".
I don't see any good way around this issue. Any suggestions?
-- Scott
[1] http://www.w3.org/TR/REC-CSS2/cascade.html#specificity