[Javascript] dynamically reading/changing values in a css class from javascript

Mike Dougherty mdougherty at pbp.com
Fri Jun 15 16:15:52 CDT 2007

On 6/15/07, Hassan Schroeder <hassan at webtuitive.com> wrote:
> > it is impossible to change the CSS itself.
> Not true: google 'document.styleSheets' for details...

I still question the appropriateness of messing around with the
stylesheet definitions via javascript.  If we separate the
presentation from behavior, then use the behavior layer to manipulate
the presentation are they really separate or just more convolutedly

Troy's suggestion to "revert" to the style in CSS by setting the
javascript property value to "" is a good way to keep the 'default'
style available.

I am preaching conventional wisdom because I believe in conventions  :)

More information about the Javascript mailing list