debian-mirror-gitlab/app/assets/javascripts/extensions/jquery.js.coffee

12 lines
301 B
CoffeeScript
Raw Normal View History

2015-09-11 14:41:01 +05:30
# Disable an element and add the 'disabled' Bootstrap class
$.fn.extend disable: ->
$(@)
.attr('disabled', 'disabled')
.addClass('disabled')
2014-09-02 18:07:02 +05:30
2015-09-11 14:41:01 +05:30
# Enable an element and remove the 'disabled' Bootstrap class
$.fn.extend enable: ->
$(@)
.removeAttr('disabled')
.removeClass('disabled')