Data Selector, inspried by Pim Jager's data selector, provides a filter for values stored using jQuery's .data() method. It uses comparison operators and methods to match the elements specified, as well as the ability to add special comparison functions.
I've created a quick testing enviorment below so you can see how it works. I've also included the test suite used when building the plugin so developers can test their special comparison functions as they want.
Test Zone
$('ul#list li:data('+str+')')
|
Examples
|
Data on each option:
Option 0: {
even: true
}
Option 1: {
odd: true,
noval: true
}
Option 2: {
even: true,
singleval: 'testcase',
falseval: false
}
Option 3: {
odd: true,
tree: {
lvl1: {
lvl2: {
fin: 22
}
}
}
}
|
Be sure to check out the docs for further documentation, and don't be afraid to mail me with any questions or bugs.