私の問題は、(固定位置) div をクリックして別の div をアニメーション化すると、ページ全体が一番上にジャンプすることです。私は preventDefault を試して false を返しましたが、何も問題を解決していないようです! 助けてください。
ここにスクリプトがあります
$(document).ready(function(){
$("#close").click(function(){
$("#info").animate({
width: "0",
height:"0"
}, 100 );
$("#info").hide(),
$(".container").animate({
left:"0",
width:"100%"
}, 100 );
return false;
});
$(".sidebar").click(function(evt){
evt.preventDefault();
$("#info").show(),
$("#info").animate({
width: "25%",
height:"100%",
left:"0"
}, 100 );
$(".container").animate({
left: "25%",
width:"75%"
}, 100 );
return false;
});
});