gitlab-org--gitlab-foss/app/assets/javascripts/extensions/jquery.js

18 lines
426 B
JavaScript
Raw Normal View History

/* eslint-disable */
// 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');
}
});
// 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);