Flippant.js :让页面内容产生翻转的迷你js+css库

jopen 11年前

Flippant.js一个让页面内容产生翻转的迷你js+css库。没有依赖任何JS框架。

var front = document.getElementByID('flipthis')    , back_content = "<h1>I'm the back!</h1>" // Generate or pull any HTML you want for the back.    , back    // when the correct action happens, call flip!  back = flippant.flip(front, back_content)  // this creates the back element, sizes it and flips it around.    // invoke the close event on the back element when it's time to close.    // call the close method on the back element when it's time to close.  back.close()  // alternatively you can trigger a close event on the back element if you fancy.  // var close_event = new CustomEvent('close')  // back.dispatchEvent(close_event)

项目主页:http://www.open-open.com/lib/view/home/1371543165328