jQuery / Twitter Bootstrap data-loading-text button with delay
In the documentation page, there is a file being loaded called application.js. http://twitter.github.com/bootstrap/assets/js/application.js
// button state demo
$('#fat-btn')
.click(function () {
var btn = $(this)
btn.button('loading')
setTimeout(function () {
btn.button('reset')
}, 3000)
});
Or just add this so it picks up the Twitter Bootstrap attribute.
$('button[data-loading-text]').click(function () {
$(this).button('loading');
});