/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
... scrollTo(0, 0); // HACK var toStart = 'translateX(' + (backwards ? '-' : '') + window.innerWidth + 'px)'; fromPage.css( 'webkitTransform', toStart ); // /HACK // Define callback to run after animation completes var callback = function(event){ // HACK fromPage.css( 'webkitTransform', ''); // /HACK ... // HACK if (animation.name === "slide") { var toStart = 'translateX(' + (backwards ? '-' : '') + window.innerWidth + 'px)'; fromPage.css('webkitTransform', toStart); } // /HACK ... // HACK if (animation.name === "slide") { fromPage.css('webkitTransform', ''); } // /HACK
URL: http://www.amberonrails.com/2010/06/jqtouch-animation-flicker-bug-fix/