blasten / turn.js

The page flip effect for HTML5
www.turnjs.com
Other
7.23k stars 2.48k forks source link

Events for start dragging and release dragging a corner? #216

Closed lightmar closed 12 years ago

lightmar commented 12 years ago

Hi,

I have an animation on the page which I would like to stop when the user is dragging a corner. As I understand, it is not the "turning" event which happens after the corner is released, and it is not the "turned" event which happens after the turn is over.

I am looking for one event that is triggered when the user clicks a corer and starts dragging, and the second is event which is triggered when the user releases the corner after a short drag so the page doesn't flip. This way I could pause the animation on page and continue it if the page was eventually not flipped.

Thanks.

blasten commented 12 years ago

It's not documented, but there are two events: "pressed" and "released". You can wait until it goes up to the flipbook.


$("#flipbook").bind("pressed", function(event) {
 console.log("pressed");
});

$("#flipbook").bind("released", function(event) {
 console.log("released");
});