Apologies if this has been asked already, I can't find the answer in the jQuery docs.
How would I select all .tooltip
classes which have a [title]
attribute, and the [title]
attribute is not empty?
In other words, select these:
<a href="#" class="tooltip" title="YES">Foo</a>
<span class="tooltip" title="YES">Bar</span>
But not these:
<a href="#" class="tooltip" title="">Empty title attribute.</a>
<span class="tooltip">No title attribute.</span>