Views
Actions

Option: turnCorners

From Turn.js Documentation
(Difference between revisions)
Jump to: navigation, search
(Values)
 
Line 13: Line 13:
 
{left-corner},{right-corner}
 
{left-corner},{right-corner}
  
===Values===
+
===Possible values===
  
 
<tt>bl,br</tt> or <tt>tl,tr</tt>  or <tt>bl,tr</tt>
 
<tt>bl,br</tt> or <tt>tl,tr</tt>  or <tt>bl,tr</tt>

Latest revision as of 23:27, 25 November 2012

Sets the corners to be used when turning the page from methods like page, next or previous.

Type Default value
String bl,br

[edit] Format

{left-corner},{right-corner}

[edit] Possible values

bl,br or tl,tr or bl,tr

[edit] Example

var way = 1;

setInterval(function() {
  if (way==1) {
    $("#flipbook").turn("next");

    if ($("#flipbook").turn("page")== $("#flipbook").turn("pages")) {
      way = 2;
      $("#flipbook").turn("options", {turnCorners: "tl,tr"});
    }
  } else {
    $("#flipbook").turn("previous");
    
    if ($("#flipbook").turn("page")==1) {
       way = 1;
       $("#flipbook").turn("options", {turnCorners: "bl,br"});
    }
  }
}, 1000);
​

See running

Main Page > API > Turn Options > Option: turnCorners