AndrewPetersV
New Member
I have a list as:\[code\] <ul> <li id="l1">1</li> <li id="l2">2</li> <li id="l3">hi</li> </ul>\[/code\]By using jquery, i got to know if any \[code\]<li>\[/code\] contains value(say) hi.For that i used:\[code\]if($('li:contains('hi')')){ alert('Got value');}\[/code\]Now i want to know the id of the \[code\]<li>\[/code\] in which i found value 'hi'.How do i get that id?