[jQuery] Static vs dynamic CSS rules
I'm playing around with the tabs example from Michal Tatarynowiczs'
lovely jQuery_Auto package and I've bumped into an issue whereby
converting the "static" CSS rules in the <head>to their "dynamic"
jQuery equiv mostly works but when it comes time to removeClass or
addClass then any CSS rules no longer work. I've bumped into this
before but now I have an example to point to...
This is a mildly hacked version with the style rules in the <head>,
and where the Active class is applied it works (the tabs update
as they should when the Active class is added or removed)...
http://markc.renta.net/jquery/tabs_static_css.html
This is an example of translating the the above <head> CSS rules
to their jQuery $().css() equivalents (the tabs no longer get
updated but all else works)...
http://markc.renta.net/jquery/tabs_dynamic_css.html
No doubt I am missing an obvious point but could anyone point out
why this is so and how to work around it, if possible ?
Would it be better to a create a single string of a whole bunch
of rules and append them to a <style> tag directly in the <head>
perhaps (to more closely emulate the "static" rules) ?
* Firefox shows some debug at the bottom, Konqueror does not
(no idea if that debug <div> shows up in other browsers).
--markc
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/