BigW Consortium Gitlab

jquery.js 522 Bytes
Newer Older
1
/* eslint-disable func-names, space-before-function-paren, object-shorthand, comma-dangle, padded-blocks, max-len */
2
// Disable an element and add the 'disabled' Bootstrap class
Fatih Acet committed
3 4 5 6 7 8 9
(function() {
  $.fn.extend({
    disable: function() {
      return $(this).attr('disabled', 'disabled').addClass('disabled');
    }
  });

10
  // Enable an element and remove the 'disabled' Bootstrap class
Fatih Acet committed
11 12 13 14 15 16 17
  $.fn.extend({
    enable: function() {
      return $(this).removeAttr('disabled').removeClass('disabled');
    }
  });

}).call(this);