Note: Animating by transitioning transforms is hardware accelerated on iOS, making this a good option there.
Image 1Image 2Image 3Image 4
Exactly the same as Demo 1, but the JS looks like this: (times 5 for the vendor specific markup)
$(document).ready(function() {
$("#slide2-1").click(function() {
$("#slide2_images").css("-webkit-transform","translate(0px, 0px)");
});
$("#slide2-2").click(function() {
$("#slide2_images").css("-webkit-transform","translate(-450px, 0)");
});
$("#slide2-3").click(function() {
$("#slide2_images").css("-webkit-transform","translate(-900px, 0)");
});
$("#slide2-4").click(function() {
$("#slide2_images").css("-webkit-transform","translate(-1350px, 0)");
});
});
Please add any questions/corrections/extra info below. Please be courteous to other users.
blog comments powered by Disqus