I m having troubles trying scroll automatically with javascript. My scrolling area is the body, my js code is
$("body").animate({scrollTop: $("#myDiv").position().top)
but I don t get any result: no animation and no scrolling I also tried
$("body").scrollTop($("#myDiv").position().top);
替换
$("body") with $(window).
任何 h?