I have a list each containing a text value. How do I get the list object having exactly a given text value?
<div id="child4"></div>
<div id="child5">ib</div>
<div id="child6"></div>
<div id="child7">ii</div>
<div id="child8">iii</div>
<div id="child1" width="200px"></div><div id="child2">i</div>
<script type="text/javascript">
alert($("div>div:contains('i')").attr("id"));
</script>
The above script gives me all the div that contains the text value i..How can I fix this so that i get an element having exactly the same text value as 'i'?