开发者

fadein +left animate jquery

original :

         $('#'+d[i].id).stop().animate({left:((i-pos)*1000)},1000,'swing'); 

    $('#'+d[i].id).('opacity', 0).stop().animate({left:((i-pos)*1000)},1000,'swing',{'opacity': 开发者_Python百科1}, 1000);

how do i fade in and slide the graphics...from the left (the sliding of the grpahics is happening but not fading in....

thanks


Have you tried adding .css in your code?

You currently have:

$('#'+d[i].id).('opacity', 0).stop().animate({left:((i-pos)*1000)},1000,'swing',{'opacity': 1}, 1000);

Try this:

$('#'+d[i].id).css('opacity', 0).stop().animate({left:((i-pos)*1000)},1000,'swing',{'opacity': 1}, 1000);

As for both of them at the same time:

$('#'+d[i].id).css('opacity', 0).stop().animate({left:((i-pos)*1000, opacity: 1},1000,'swing');


You can animate multiple properties at once:

.animate({left:(i-pos)*1000,opacity:1}, 1000, 'swing')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜