鉴于以下示例:
$.keyframe.define([{
name: 'myfirst',
'0%': {top:$("#test").innerHeight()*-1; left:0px},
'100%': {top:$("#test").innerHeight()*-1; left:0px}
}]);
我想为slideShow制作一个插件,并希望自动完成。我需要这样的例子:
var timeTransition = 10;
var howManyImages= $("div.slider ul.slide li img").size();
var timeIntervals= Math.round(100/howManyImages);
var timeImages= 0;
var t = 0;
var supportedFlag = $.keyframe.isSupported();
$.keyframe.define([{
name: 'myKeyframe',
/*
here, i wish to put a function like below where this result, will populate the $.keyframe.define parametrs.
Should be that the next line would be for exemple:
function () { here de result printed od function}?
*/
for (i = 0; i < howManyImages; i++) {
tMin = t + timeIntervals;
tMax = t + timeIntervals;
t+=timeIntervals;
if(i==0) tMin=0;
if(i==howManyImages) tMax=100;
tMin'%' : { margin-left:-timeImages'%'},
tMax'%' : { margin-left:-temptimeImagesoImagens'%'}
timeImages+=100;
}
// end of $.keyframe.define([{
}]);
我该怎么做?
非常感谢!