Say I have a .box class in CSS:
.box
{
height: 50px;
}
Now, I use javascript to allow the user to expand the box and make it small again. Currently I have the value of the box height (ie 50 px) hardcoded in javascript.
I'm wondering if there's a way where my javascript code can access the height attribute of the box class as defined in CSS so that if I change the height in CSS to 100px for example, I wouldn't have to go and manually change the corresponding variable in javascript
btw I'm using rails3 and jquery