I have tried to add a scrollTo function to my actual JS
$(function() {
$('.click').click(function() {
$('#me').stop().slideToggle(500);
return false;
});
});
It just basically display the hidden div under the actual text
What I would like to do is it should jump right away to div
Js fiddle http://jsfiddle.net/3zahL1qv/
What I tried to do is adding $.scrollTo($('#me'), 500);
, but for some reason it does nothing but just break my current JS
Thanks in advance
Just add $(window).scrollTop(500); in your code. Here is a working example-http://jsfiddle.net/3zahL1qv/1/
Better way to do it as follow:
});
Working example: http://jsfiddle.net/3zahL1qv/13/