Created
March 15, 2013 10:42
-
-
Save tx2z/5168938 to your computer and use it in GitHub Desktop.
Attributes(ids or names) with square brackets and jquery - http://jesus.perezpaz.es/2013/01/attributesids-or-classes-with-square-brackets-jquery/
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
function $$(selector, context){ | |
return jQuery(selector.replace(/(\[|\])/g, '\\$1'), | |
context) | |
} |
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
$$('#contact[email]') ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment