Skip to content

Instantly share code, notes, and snippets.

@andrijac
Created August 15, 2012 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrijac/3359376 to your computer and use it in GitHub Desktop.
Save andrijac/3359376 to your computer and use it in GitHub Desktop.
Disable all bootstrap buttons, jquery plugin
$.fn.disableButton = function () {
this.each(function (index, item) {
if (this.tagName === 'A') {
$(this).attr('disabled', 'disabled');
}
if (this.tagName === 'BUTTON') {
$(this).addClass('disabled');
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment