If I have the following HTML
<Something attribute="" id="top">
<Something attribute="child" id="child"></Something>
</Something>
I am trying to get a jquery object representing the second Something element. I am trying the following query (as suggested in this question Find all elements with a certain attribute value in jquery) in my browser console
$("Something[attribute='child']")
But I seem to be getting the same empty array each time, however the following works
$("Something[attribute='']")
This returns me an array of one element representing the first Something element
Something[attribute='child']-> Selectssomethingthat has the attributeattribute='child'|Something [attribute='child']-> selectssomethingthat has a child that has the attributeattribute='child'.