I'm using a animated scroll to id function that works really well for a whole page, moving to different elements with specific ids in a page. What I'd like to be able to do though is have the scrolling limited to a specific div that has a height of 450, width of 910 and overflow-y:scroll set.
function goToByScroll(id){
$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');
}
and then putting in a link:
<a href="javascript:void(0)" onClick="goToByScroll('1')">Go to anchor 1</a>
example from this page http://djpate.com/2009/10/07/animated-scroll-to-anchorid-function-with-jquery/comment-page-2/#comment-41618
I like how simple this is, and was hoping that could be mostly maintained (obviously it will be more involved then what it is now). It'd be great if it could keep the functionality of scrolling to a element anywhere on a page, but also having a link that made a div with overflow also scroll only. Thanks in advance for any help the community might be able to give me.