I was wondering if there's a way to select an item (div,span,whatever..) using javascript with jQuery (+ jQuery UI lib) based on its data attribute value. For example, let's say I have:
<div class="b">Hi</div>
I then assign some data to it:
$('.b').data('myKey', 1234);
Then, I want to find a div (or multiple divs that) satisfy condition myKey = 1234 . For example, like this:
var resultingElement = $('.b:data(myKey=1234)');
Is it possible by default, or do I have to implement this kind of selector myself? And no, I don't want to use HTML5's visible data-* attributes for this.