I've got a class with the display set to none
I'd like to in Javascript now set it to inline
I'm aware I can do this with an id with getElementById
but what's the cleanest way to do it with a class?
|
|||||
feedback
|
You can do that — actually change style rules related to a class — using the |
|||
feedback
|
you can create new style rule instead.
|
|||
feedback
|
You can use For this you should use a javascript framework such as jQuery, mootools, prototype, etc. In jQuery it could be done with a one-liner as this:
|
|||||||
feedback
|
Do you mean something like this?
Then the CSS
|
|||||||||
feedback
|
Best way to do it is to have a hidden class, like so:
After that, there is a One piece of advice: Use jQuery. Makes it easier to deal with that kind of stuff, you can do it like:
|
|||||||||||||
feedback
|