Option: turnCorners: Difference between revisions

From Turn.js Documentation
Jump to navigation Jump to search
No edit summary
Line 16: Line 16:


<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>
===Example===
<pre class="javascript">
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);
</pre>
[http://jsfiddle.net/blasten/A9a7E/854/ See running]


===See also===
===See also===

Revision as of 05:32, 11 September 2012

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

Type Default value
String bl,br

Format

{left-corner},{right-corner}

Values

bl,br or tl,tr or bl,tr

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

See also

Corners

<yambe:breadcrumb>Turn Options</yambe:breadcrumb>