In this example , I would like to trigger swiperight function first , and check whether the book is “pressed” . How to turn the bind “pressed” into a conditional statement? thank you.
$(document).swiperight(function(){
$("#book").bind("pressed", function(event) { // Change this statement to if ($("#book") is "pressed"){..}
console.log("pressed");
});
});
Try