I originally created a web app in HTML, CSS and JavaScript, then was asked to create it again in Bootstrap too. I\'ve done it all fine, but I had toggle buttons in the web app t
I've been trying to activate 'active' class manually with javascript. It's not as usable as a complete library, but for easy cases seems to be enough:
var button = $('#myToggleButton');
button.on('click', function () {
$(this).toggleClass('active');
});
If you think carefully, 'active' class is used by bootstrap when the button is being pressed, not before or after that (our case), so there's no conflict in reuse the same class.
Try this example and tell me if it fails: http://jsbin.com/oYoSALI/1/edit?html,js,output