Got a list saved by using .data(). How is it possible to find exact string?
$('body').data('mobilMenu' , $("ul#globalMenu").html());
list looks like (ul#globalmenu):
<ul>
<li> <a href="t.aspx">t</a></li>
<li> <a href="b.aspx">b</a></li>
<ul>
<li> <a href="t.aspx">TEST </a></li><--HOW DO I FIND THIS in .data()
<li> <a href="b.aspx">b</a></li>
I want to search for the word “TEST ” and then get the url for that link. don’t use .contains .. need to know excact
Get the data with:
Find all
<a>elements and use .filter() to extract element with exact text ‘TEST ‘:DEMO