开发者

fadein +left animate jquery

开发者 https://www.devze.com 2023-02-18 20:31 出处:网络
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百

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

精彩评论

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