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

Lee Bettridge lbettridge at twowaytv.co.uk
Thu Jun 14 06:18:24 CDT 2007


Is it possible to read a value from a CSS class and assign it to a
javascript variable ? and then in turn change the value in the CSS class
from javascript?

 

Eg.

 

In CSS file

 

.navPanel

{

      position: absolute;

      background: url(gfx/panel.png) no-repeat;

      top: 325px;

      left: 39px;

      width: 561px;

      height: 124px;

      z-index: 2;

      visibility: hidden;

}

 

in Javascript file

 

var width = [somehow read the .navPanel.width value]


-- 

Two Way TV is the trading name of Two Way Media Ltd

Company Number: 4904168

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20070614/92c276c1/attachment.htm>


More information about the Javascript mailing list