turn of scroll to a div code example
Example: scroll to element in scrollable div
function scrollInDiv($scrollableDiv, $scrollTo, animate = true) {
var scrollTo =
$scrollTo.offset().top +
$scrollableDiv.scrollTop() -
$scrollableDiv.offset().top;
if (animate)
$scrollableDiv.animate({
scrollTop: scrollTo,
});
else $scrollableDiv.scrollTop(scrollTo);
}