Response title
This is preview!
var jsonString = "{ \"0%\" : { \"margin-left\":\"-0%\"},";
jsonString += " \"25%\" : { \"margin-left\":\"-0%\"},";
jsonString += " \"30%\" : { \"margin-left\":\"-100%\"},";
jsonString += " \"50%\" : { \"margin-left\":\"-100%\"},";
jsonString += " \"55%\" : { \"margin-left\":\"-200%\"},";
jsonString += " \"75%\" : { \"margin-left\":\"-200%\"},";
jsonString += " \"80%\" : { \"margin-left\":\"-300%\"},";
jsonString += " \"100%\" : { \"margin-left\":\"-300%\"}}";
jsonString = JSON.parse(jsonString);
console.log(jsonString);
$.keyframe.define([
$.extend(
{ name: 'jsonString' },
jsonString
)
]);
var obj = obj;
for (i = 0; i < quantasImagens; i++) {
tMin = t + tempoTransicao;
tMax = t + tamanhoIntervalos;
t += tamanhoIntervalos;
if (i == 0) tMin = 0;
if (i == quantasImagens) tMax = 100;
obj[tMin + '%'] = { 'margin-left': '-' + tempoImagens + '%'};
obj[tMax + '%'] = { 'margin-left': '-' + tempoImagens + '%'};
tempoImagens += 100;
}
console.log(obj);
A step in the keyframe.unless you add a new step at the end to go back to the beginning.
obj[ '100%'] = { 'margin-left': '0%'};
Or whatever you need to show the first image.
© 2013 jQuery Foundation
Sponsored by and others.