0
我一直在玩菜單上的緩動,只是讓我頭暈。我有一個菜單,當你點擊它時,它將關聯的內容簡化到視圖中。我不確定要使用哪些搜索字詞來讓元素顯示而非簡單。而不是動畫從-1000px到0px,直接從一個到另一個。jquery替換寬鬆和動畫
這裏是我一直使用的代碼CODROPS
我試圖修改或替換它,以便頁面不會輕鬆進入視圖它只是閃爍的存在。
if(idx > current){
$current.stop().animate({'top':'-1000px'},600,'linear',function(){
$(this).css({'top':'310px'});
});
$next.css({'top':'1000px'}).stop().animate({'top':'5px'},600,'linear');
}
/* UP THE LIST */ else if(idx < current){
$current.stop().animate({'top':'1000px'},600,'linear',function(){
$(this).css({'top':'1000px'});
});
$next.css({'top':'-1000px'}).stop().animate({'top':'5px'},600,'linear');
}
再次謝謝你的朋友。我正在查找如何將這些代碼實現到上面的代碼中。 – rd42