原文:http://lab.smashup.it/flip/
效果如下:
例子:github: botelho-flipboard-layout-bcd8f5b
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: