I was wondering what's the easier way to change the .mouseleave for a .click in this Flip Effect:
It's doesnt work just by changing it, I've read about using .toggle but not sure how.
$('.flip').click(function(){
$(this).find('.card').addClass('flipped').mouseleave(function(){
$(this).removeClass('flipped');
});
return false;
});
http://jsfiddle.net/nicooprat/GDdtS/
Thanks in advance.
As easy as:
$('.flip').click(function(){
$('.card', this).toggleClass('flipped');
return false;
});