mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-10 21:26:07 +10:00
12 lines
301 B
CoffeeScript
12 lines
301 B
CoffeeScript
# Disable an element and add the 'disabled' Bootstrap class
|
|
$.fn.extend disable: ->
|
|
$(@)
|
|
.attr('disabled', 'disabled')
|
|
.addClass('disabled')
|
|
|
|
# Enable an element and remove the 'disabled' Bootstrap class
|
|
$.fn.extend enable: ->
|
|
$(@)
|
|
.removeAttr('disabled')
|
|
.removeClass('disabled')
|