I'm using the Flip! plugin to flip a div on click and revert the flip when a user clicks the div again. The code below makes the DIV flip but does not flip it back when you click it again.
JavaScript
$(function(){
$("#flipbox").bind("click",function(){
$("#flipbox").flip({
direction:'rl',
content:'this is my new content',
onEnd: function(){
$("#flipbox").bind("click",function(){
$("#flipbox").revertFlip();
});
}
})
return false;
});
});
HTML
<div id="flipbox">
Hello! I'm a flip-box! :)
</div>
Appreciate any help.