I seem to have stumbled upon a problem with a very simple task. I am trying to hide the parent div when clicking on the child.
Here is my HTML;
<div class="wave-wrap"><div class="wave">click me</div></div>
<div class="wave-wrap"><div class="wave">click me</div></div>
<div class="wave-wrap"><div class="wave">click me</div></div>
Here is my jQuery;
$('.wave').click(function() {
alert($(this).parent().html());
$(this).parent().hide('slow');
});
The warning seems to indicate that I have the correct selector, but the parent div refuses to hide. Any ideas why?
source
share