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);
and also replacing
$("body") with $(window).
Any hint?