Hey there! I've been using a cool flippy jquery plugin that I found on this website. It's working great, but I have run into an issue. When the element flips, I want to include a button on the flip side that takes the user to a different page.
The problem is that if any div inside the flipped element is clicked, it triggers the flipping animation again.
I'm looking for a solution to prevent the flip from happening when a div within the flipped element is clicked.
Check out my code here: http://jsfiddle.net/hw7rP/2/
<div class="left bigbox sponsor">
<div class="sponsorFlip">
the front
</div>
<div class="sponsorData">
<div class="ifIgetClickedDontFlip">click me</div>
</div>
</div>
JavaScript:
$('.sponsorFlip').bind("click",function(){
var elem = $(this);
if(elem.data('flipped'))
{
elem.revertFlip();
elem.data('flipped',false)
}
else
{
elem.flip({
direction:'lr',
speed: 350,
color: '#000',
onBefore: function(){
elem.html(elem.siblings('.sponsorData').html());
},
onEnd: function(){
//ajax requests every second
}
});
elem.data('flipped',true);
}
});
Can anyone provide some assistance with this? Thank you!