BigW Consortium Gitlab

jquery.js 405 Bytes
Newer Older
1
// Disable an element and add the 'disabled' Bootstrap class
Fatih Acet committed
2 3 4 5 6 7 8
(function() {
  $.fn.extend({
    disable: function() {
      return $(this).attr('disabled', 'disabled').addClass('disabled');
    }
  });

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

}).call(this);