Update basic jQuery script to use ScrollTo function

AleceBuh

New Member
I have a jQuery SlideDown/SlideUp Demo here: https://tinker.io/8e585/15Is it possible that when I click the 'Test 2' link, the viewport moves down to that part of the page? So 'Test 2' would then appear at the top of the window?I had tried: \[code\]$(window).scrollTop($('div#box2').offset().top)\[/code\] but was having issues in FF.Any ideas of a simple solution to this?Many thanks :-)
 
Back
Top