[oops!]: it looks like something i did in 0.3 has broken IE. I’m trying to track it down now, so if you’re looking to implement the pageflip, use 0.2 instead. In the meantime, if there’s a CSS savant that can figure out where it’s breaking in IE, please let me know.
[fixed!]: Thanks to Scott Reston for the help with my CSS missteps. This also revealed another problem with the shadow effect in IE, which I’ve disabled in the current version, 0.3.2. This version also incorporates a bugfix from Rhapsody (See comments below).
- – -
the previous version only worked with images as the page contents. this current version works with arbitrary HTML, inside DIVs.
it’s all pretty well commented, but here’s the gist of it:
include jquery on your page (latest should work fine. i built and tested with 1.3.)
include the pageflip.js:
one small variable to control how fast transitions happen:
/* pageflip timing */
var flipTime = 1000; // in ms [recommended 1000]
and appropriate stylesheets. i also utilize Eric Meyer’s reset.css to make things easier on myself. this is optional.
<link rel="stylesheet" type="text/css" href="style/reset.css">
<link rel="stylesheet" type="text/css" href="style/pageflip.css">
finally, in the content of your page, create a div for your “book”, and one for each of your pages:
<div id = "pagesContainer">
<div class="pageContent" style="width: 300px; height: 400px;">
IMPORTANT: you must set the height and width of the first page DIV. the size of all your pages are based on this.
you’ll want an even number of total pages.
share and enjoy.
really. it’s Creative Commons.