I have a div and i insert a data-test attribute in it :
<div id="container">
<div data-test="test"></div>
</div>
Now i want to find inner div , with this expression :
alert($("#container").find("[data-test=test]").length);
But this is not working . Whats the problem here?
try quoting your value: