Posted By

peterbelsky on 10/20/10


Tagged


Versions (?)

JQTouch Animation Flicker Bug Fix


 / Published in: JavaScript
 

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

  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

Report this snippet  

You need to login to post a comment.