Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
cleanest jQuery I've ever writtern
$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