I'm currently working on developing an iPad web application. The .animate() method doesn't meet the necessary speed requirements, so I've opted to utilize CSS for most of my transitions. How can I go about implementing
html
<div id="myGallery" class="container"></div>
css
.container {
position: fixed;
-webkit-transition: -webkit-transform 0.25s ease-in-out;
}
.pos-1 {
-webkit-transform:translate3d(0px,0px,0px);
}
.pos-2 {
-webkit-transform:translate3d(100px,0px,0px);
}
.pos-3 {
-webkit-transform:translate3d(200px,0px,0px);
}
js
$("#myGallery").removeClass("pos-" + this.previousId).addClass("pos-" + this.currentId);
$("#myGallery").bind("webkitAnimationEnd", function() {
// this.style.webkitAnimationName = "";
console.log("done animating");
});
How can "webkitAnimationEnd" be effectively used to trigger the message "done animating" without relying on the .animate() method?