I have the following situation:
<div class='err'>
Error 1
<span>
<a title='ignore'>x</a>
</span>
</div>
<div class='err'>
Error 2
<span>
<a title='ignore'>x</a>
</span>
</div>
The ‘errors’ are displayed in this form. What I want is: when the x is clicked the div in which the x is located to vanish. !?
$('.err span a ??').click(function() {
$(this .err ??).hide();
});
Thanks!
You can use
closestmethod.http://jsfiddle.net/eYXff/