What is Flip?
Flip is a jQuery plugin that will flip easily your elements in four directions. Try it
Hello! I'm a flip-box! :)
How to use?
Like every jquery plugin, just chain it:
$("#flipbox").flip({ direction:'tb' })
How to change content?
Add content params in this way:
$("#flipbox").flip({ direction:'tb', content:'this is my new content' })
How to add callbacks?
There are three available callbacks: onBefore, onAnimation, onEnd
$("#flipbox").flip({ direction:'tb', onBefore: function(){ console.log('before starting the animation'); }, onAnimation: function(){ console.log('in the middle of the animation'); }, onEnd: function(){ console.log('when the animation has already ended'); } })
How to revert a flip?
There's an "hidden" method called revertFlip: as it says, revert a flip to the previous state
$("#flipbox").revertFlip()
All options
Here are all options available: