【发布时间】:2015-07-15 17:26:45
【问题描述】:
我试图通过动画高度和移动页面来显示一个带有地图的 div(以前设置为 display:none 和一个设置的高度),以便 div 完全可见。 这可行,但它分两个步骤发生 - 我希望它同时进行。 (被注释掉的行是一种行不通的尝试)。
有什么想法吗?
$( "#map" ).animate({
height:"show"
//scrollTop: $(this).get(0).scrollHeight
},400,"swing", function(){
$('html, body').animate({scrollTop: $("#map")[0].scrollHeight },400);
});
【问题讨论】:
标签: jquery position jquery-animate height scrolltop