Jquery get closest parent
Possible duplicate:
closest ancestor node in jQuery
HTML:
<div class="post"> <h2><a href="#" title="">Pellentesque</a></h2> <p><a href="#" title="" class="more">More</a></p> </div> JQuery
$('.more').bind("hover", function(){ $(this).parent('.post').hide() ; }); on hover (.more) I want to hide the message, but it does nothing if I use parent (), instead it removes ALL .posts on the page
any help appreciated
+6