removeClass not working
removeClass not working
Hi,
i am trying to reverse an animation using removeclass and it does not work. As I'm quite new to jquery I suppose I am missing something obvious - maybe someone can help.
There is this small window
<div class="fenster f15">
<div class="flap">
</div>
<a href="
http://whatever..."><img class="button" src="button.jpg"/></a>
</div>
which is opend by
$('.fenster').click(function(){
$(this).addClass("opend");
$(this).children(".flap").addClass("flap_open" );
$(this).find(".button").show();
});
where "flap_open" is my animation
but when I try
$('.flap_open').click(function(){
$(this).parent(".fenster").removeClass("opend");
$(this).find(".flap").removeClass("flap_open" );
$(this).find(".flap").addClass("flap_close" );
$(this).find(".button").hide();
});
to trigger the closing animation but nothing happens. I tried as well making a specialiced close button, but that has no effect as well.
any ideas where I made the mistake?