Skip to content

Instantly share code, notes, and snippets.

@kferran
Created January 9, 2013 00:23
Show Gist options
  • Save kferran/4489389 to your computer and use it in GitHub Desktop.
Save kferran/4489389 to your computer and use it in GitHub Desktop.
toggle all form inputs disabled
(function($){
$.fn.toggleDisabled = function(){
return this.each(function(){
var $this = $(this);
if ($this.attr('disabled'))
$this.removeAttr('disabled');
else
$this.attr('disabled', 'disabled');
});
};
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment