javascript - Loop animation with velocity.js -



javascript - Loop animation with velocity.js -

i'm trying kind of loop animation velocity.js: translate object on x axis 0 473, 0 473 , on.

i've succeeded (code below) on android chrome , ios chrome browsers loop starts on delay (lag). can help?

function start() { $(".el").velocity( { translatex: [ -473, 0 ] }, { duration: 8000, delay: 0, easing: "linear", complete: reset }); } function reset() { $(".el").css("transform", "translate(0px, 0px)"); start(); } start();

since you're using forcefeeding, .css() phone call redundant.

removing line removes initial lag on chrome android:

$el = $(".el"); function start() { $el.velocity( { translatex: [ -473, 0 ] }, { duration: 8000, delay: 0, easing: "linear", complete: start }); } start();

and can see live version here.

javascript android ios velocity.js

Comments

Popular posts from this blog

php - Edges appear in image after resizing -

ios8 - iOS custom keyboard - preserve state between appearances -

Delphi change the assembly code of a running process -