Hi All,
I'm a bit confused on how to properly select a parent item, that is 2 DIV's up.
In other words, my HTML looks like this:
<div>Folder</div>
<div class="file_info">
<a href="test.jpg">Test File</a>
</div>
Here's my current jQuery: $("a[href$='.jpg']").addClass("Image");
However, I don't want to add the class to the <a>
, instead, I want to add the class to the 'folder' 2 DIV's above.
What's the best way to do this?
Thanks!