Is it possible to add/update a css class using JQuery.
I know I can add css to a DOM element using this add css rule using jquery, but I would like to add/remove fro
You can do this by using the addClass and removeClass functions in jquery. Add the class like this:
$("#button1").click(function(){
$(#the_div).addClass('myClass');
});
Then you can remove it like this:
$("#button2").click(function(){
$("#the_div").removeClass('myClass');
});
Your CSS properties should be defined in ".myClass".