I’m making some basic site with Twitter Bootstrap
I have one div and two classes I want to use.
I want to implement button which will change div’s class and then after clicking again, to change it back.
Found many ways, but none of them changes class back.
The Best way would be to use Bootstrap JS or Jquery
Thanks
Demo 1: http://jsfiddle.net/Jsqh4/
Demo 2 (separate button): http://jsfiddle.net/Jsqh4/1/
Bootstrap uses jQuery for its components, so a jQuery solution is probably easiest for you.
See also: http://api.jquery.com/toggleClass/