JQTouch Animation Flicker Bug Fix


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ...
  2. scrollTo(0, 0);
  3.  
  4. // HACK
  5. var toStart = 'translateX(' + (backwards ? '-' : '') + window.innerWidth + 'px)';
  6. fromPage.css( 'webkitTransform', toStart );
  7. // /HACK
  8.  
  9. // Define callback to run after animation completes
  10. var callback = function(event){
  11. // HACK
  12. fromPage.css( 'webkitTransform', '');
  13. // /HACK
  14. ...
  15.  
  16.  
  17.  
  18.  
  19. // HACK
  20. if (animation.name === "slide") {
  21. var toStart = 'translateX(' + (backwards ? '-' : '') + window.innerWidth + 'px)';
  22. fromPage.css('webkitTransform', toStart);
  23. }
  24. // /HACK
  25.  
  26. ...
  27.  
  28. // HACK
  29. if (animation.name === "slide") {
  30. fromPage.css('webkitTransform', '');
  31. }
  32. // /HACK

URL: http://www.amberonrails.com/2010/06/jqtouch-animation-flicker-bug-fix/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.