jQuery scroll to element

jQuery scroll to target element:


$(function(){

	$("#click").click(function (){

		$('html, body').animate({

			scrollTop: $('.target').offset().top

		}, 2000);

	});

});​

Leave a Comment