BigW Consortium Gitlab

jquery.js.coffee 301 Bytes
Newer Older
1 2 3 4 5
# Disable an element and add the 'disabled' Bootstrap class
$.fn.extend disable: ->
  $(@)
    .attr('disabled', 'disabled')
    .addClass('disabled')
6

7 8 9 10 11
# Enable an element and remove the 'disabled' Bootstrap class
$.fn.extend enable: ->
  $(@)
    .removeAttr('disabled')
    .removeClass('disabled')