2016-07-26 23:32:10 -04:00
|
|
|
// Disable an element and add the 'disabled' Bootstrap class
|
2016-07-24 16:45:11 -04:00
|
|
|
(function() {
|
|
|
|
$.fn.extend({
|
|
|
|
disable: function() {
|
|
|
|
return $(this).attr('disabled', 'disabled').addClass('disabled');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2016-07-26 23:32:10 -04:00
|
|
|
// Enable an element and remove the 'disabled' Bootstrap class
|
2016-07-24 16:45:11 -04:00
|
|
|
$.fn.extend({
|
|
|
|
enable: function() {
|
|
|
|
return $(this).removeAttr('disabled').removeClass('disabled');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}).call(this);
|