0
嗨,人們我已經實現了一個基於jquery的我的網站movile固定菜單,但我有一個問題,marginTop和marginBottom裏面的每個句子,marginBottom不工作它接縫像缺少的東西,請檢查一下。marginTop vs marginBottom每個循環jquery
在-活生生的例子: http://www.utxj.edu.mx/menu_example/index.html
我的代碼...
$(document).ready(function(){
$(function() {
var d=300;
$('#navigation a').each(function(){
$(this).stop().animate({
'marginTop':'-80px'
},d+=150);
});
$('#navigation > li').hover(function() {
$('a',$(this)).stop().animate({
'marginTop':'-2px'
},200);
}, function() {
$('a',$(this)).stop().animate({
'marginTop':'-80px'
},200);
}
);
});
});
$(document).ready(function(){
$(function() {
var d=300;
$('#navigation2 a').each(function(){
$(this).stop().animate({
'marginBottom':'-80px'
},d+=150);
});
$('#navigation2 > li').hover(function() {
$('a',$(this)).stop().animate({
'marginBottom':'-2px'
},200);
}, function() {
$('a',$(this)).stop().animate({
'marginBottom':'-80px'
},200);
}
);
});
});
TNX 4的幫助。
'$(文件)。就緒(函數(){'和'$(函數( ){'做同樣的事情;選擇一個,而不是兩個 –