my .parent() selector doesn't work with .hide() function. This is my HTML:
...
<div class="overpopup">
<div class="overpopup--background">
</div>
<div class="overpopup--content">
<img src="http://placehold.it/600x600?text=Overpopup">
</div>
</div>
...
and this part of my jQuery:
$(document).ready(function() {
...
$('.overpopup--background').click(function(){
$(this).parent().hide();
});
});
can anyone spot a mistake I made? I tried diffenent Actions, like adding css worked and those worked. Is hiding the parent even legal in jQuery? And if not, is there a easy workaround?