Skip to content

Instantly share code, notes, and snippets.

@mikedugan
Created April 1, 2014 22:15
Show Gist options
  • Select an option

  • Save mikedugan/9924213 to your computer and use it in GitHub Desktop.

Select an option

Save mikedugan/9924213 to your computer and use it in GitHub Desktop.
simple html input activation/deactivation
$('.activator').click(function() {
var target = $('#'+$(this).data('target')); //returns data-target value
if(target.attr('disabled'))
{ target.removeAttr('disabled'); }
else target.attr({'disabled':'disabled'});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment