Created
October 23, 2012 17:29
-
-
Save amycheng/3940218 to your computer and use it in GitHub Desktop.
cleanest jQuery I've ever writtern
This file contains 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
$formField.click(function(){ | |
var $_this= $(this); | |
$_this | |
.css('opacity','1') | |
.find('input').removeAttr('disabled'); | |
$_this.siblings() | |
.css('opacity','.5') | |
.find('input').attr('disabled','disabled'); | |
}); | |
/* | |
I went from 20+ lines of code to this. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment