Hi,
I am trying to work out a complicated jQuery selection. I have an array, and I need to select div.foo
that contains a link a.bar
and the link's href
contains any of the strings in the array.
For example:
<html>
<div class=foo>
some text
<a class=bar href=example.com?q=widget&id=23456789>search</a>
</div>
</html>
and jScript
widgets[0]='12345678';
widgets[1]='23456789';
widgets[2]='34567890';
I want to highlight this div because the query string contains 23456789
which is one of the elements in widgets[]
.
Thanks