I am creating a small directory with links to scroll to the alphabetical list within a scrollable div. I need to have the contents of the div scroll only not the entire page. I am using Smooth scroll found here:
https://github.com/kswedberg/jquery-smooth-scroll
This is my code:
$(document).ready(function() {
$('.quick_links li a').click(function() {
$.smoothScroll({
scrollElement: $('#designers_box'),
scrollTarget: '#designers_box'
});
return false;
});
});
I know I shouldn’t use #designers_box on both arguments but not really understanding the documentation. Is anyone familiar with this?
Here is a link to the work:
http://fourcemag.kenaesthetic.com/homme/index.htm
You will see it is doing something but not quite working yet.
Thanks for the help all.
Your
scrollElementis what is scrolled and yourscrollTargetis where it is scrolled to.So, this would be my guess: