I\'m trying to get this exact example working on my website:
http://getbootstrap.com/2.3.2/javascript.html#buttons
However, simply including this HTML:
Make a note of how the accepted answer converted the jQuery button object to a js var before running button('loading') on it because, while this works, button('loading') will not work when used directly on the jQuery button object.