If I have an element nested as:
<ul>
<li><img src="/blah.jpg" class="removeme" /></li>
<li><img src="/ole.jpg" class="keepme" /></li>
</ul>
How do I go about removing the entire list containing the img class that has removeme
?
I've been able to get to
alert($(containername).children('ul').children('li').children().hasClass("removeme"))
returns true but I can't seem to remove the entire <li></li>
(and not only the img).
Thanks in advance!