Created
July 19, 2011 04:46
-
-
Save elijahmanor/1091327 to your computer and use it in GitHub Desktop.
Selector Using HTML5 Data Attributes
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
var valueImLookingFor = "myvalue"; | |
//The string concatenation just feels wrong to me... | |
$( "p[data-mytype" + "='" + valueImLookingFor + "']" ) | |
.doSomething(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment