Method: addPage: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
| Page Number | | Page Number | ||
| | | | ||
<pre class="javascript">$("#flipbook").turn("pages")+1</pre> | <pre class="javascript">$("#flipbook").turn("pages")+1</pre> | ||
|} | |} | ||
To insert the page 10, you can just do: | |||
<pre class="javascript"> | <pre class="javascript"> | ||
element = $( | element = $("<div />").html("Loading..."); | ||
$( | $("#flipbook").turn("addPage", element, 10); | ||
</pre> | </pre> | ||
Or | |||
<pre class="javascript"> | |||
element = $("<div />", {"class": "p10"}).html("Loading..."); | |||
$("#flipbook").turn("addPage", element); | |||
</pre> | |||
Notice that the CSS class <tt>p10</tt> also indicates the page number being inserted. | |||
== See also== | |||
[[Event: missing|Event: missing]] | |||
<yambe:breadcrumb>Turn Methods</yambe:breadcrumb> | <yambe:breadcrumb>Turn Methods</yambe:breadcrumb> |
Latest revision as of 04:03, 7 July 2012
Adds a page to the flipbook.
Parameter | Type | Description | Default Value |
---|---|---|---|
element | jQuery element | Pointer to the DOM element of the page | $("<div />") |
pageNumber | Number | Page Number |
$("#flipbook").turn("pages")+1 |
To insert the page 10, you can just do:
element = $("<div />").html("Loading..."); $("#flipbook").turn("addPage", element, 10);
Or
element = $("<div />", {"class": "p10"}).html("Loading..."); $("#flipbook").turn("addPage", element);
Notice that the CSS class p10 also indicates the page number being inserted.
See also
Event: missing <yambe:breadcrumb>Turn Methods</yambe:breadcrumb>