我們的問題涉及到在這個位置jQuery的動畫:JQuery的旗幟下拉 - 動畫跳動,結束32個像素太高
http://www.simalam.com/leeanderson/profile/
點擊下拉箭頭看動畫......並點擊向上箭頭關閉橫幅。現在你已經看到了,我可以更好地描述問題是什麼。
動畫在靠近底部處跳動,並以錯誤的位置結束(特別是32像素過高)。儘管如此,它始於正確的位置。
我們嘗試在每種可能的組合中切換-32和0。對於兩個if語句,給我們提供我們喜歡的動畫的唯一組合是0 0。但是我們不喜歡個人和組織下面的32像素白色邊框。
如果有人有任何建議,他們將不勝感激。
這裏是適用於它的代碼:
/* code for dropdown of menu */
$("#dropArrow").click(function() { //with every click, the arrow should rotate
value += 180; //for every click, add 180 degrees, so that it goes back to either pointing up or down with each click
if ((value % 325) == 0) { //(hide) before hiding the .topDivSlideWrap, we do this first and restore css settings to default
$(".drop").css("top", "-0px"); //move .drop back to original positioning
$("#individuals").css("z-index", "0"); //remove z-index of #individuals
$("#organizations").css("z-index", "0"); //remove z-index of #individuals
}
$('.topDivSlideWrap').slideToggle('slow', function() {;
if (value % 325) { //(show), this is set in a callback function so it happens after slideToggle
$(".drop").css("top", "-32px"); //move .drop up to hide whitespace
$("#individuals").css("z-index", "1000"); //add z-index of #individuals
$("#organizations").css("z-index", "1000"); //add z-index of #individuals
}
});
$('#rotate').rotate({ //function within a function
animateTo:value,easing: $.easing.easeInOutCirc //rotate 180 degrees every time
});
});
我在Safari中看不到任何動畫問題。 – Sparky