I'm looking for a specific element which contain a known data attribute. The actual value of the data could be anything. Example:
<div id="myObject">
<div>
<span data-some-data="anything">something</span>
</div>
<div>
I'm trying to access the span tag in the above example.
I've tried something like:
var $theElementINeed = $('#myObject').find("[data-some-data='" + ??? + "']");
But the value could be anything. So I don't know how to find the span. Any suggestions?