Skip to content

Instantly share code, notes, and snippets.

@iredun iredun/js.js
Created Apr 20, 2017

What would you like to do?
scrollTo jQuery extend
scrollTo : function(speed, easing)
return this.each(function()
var targetOffset = $(this).offset().top;
$('html,body').animate({scrollTop: targetOffset}, speed, easing);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.