Created
April 1, 2014 22:15
-
-
Save mikedugan/9924213 to your computer and use it in GitHub Desktop.
simple html input activation/deactivation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $('.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