I have an HTML dom with three divs like this:
<div data-tab="1">
</div>
<div data-tab="2">
</div>
<div data-tab="3">
</div>
Then I gather all these divs in a jQuery object like this:
var $tabs = jQuery( '*[data-tab]' );
So now, $tabs contains all three. Thats great. However, I am trying to alter one of them, so I tried using find() to find the object I wanted to alter, but somehow, I cant find any of the objects in $tabs with find().
Example:
$tabs.find( '*[data-tab="2"]' ); simply returns []
Why isnt this working, or even better, what works? :P
.findonly looks at the descendants of the selected elements.