Skip to content

Instantly share code, notes, and snippets.

@igorvieira
Created April 29, 2017 11:55
Show Gist options
  • Save igorvieira/ce06051c02037b0934543a724df2de0a to your computer and use it in GitHub Desktop.
Save igorvieira/ce06051c02037b0934543a724df2de0a to your computer and use it in GitHub Desktop.
$(document).ready(function(){var b=700;$(window).scroll(function(){$(this).scrollTop()>220?$(".topo").fadeIn(b):$(".topo").fadeOut(b)}),$(".topo").click(function(a){return a.preventDefault(),jQuery("html, body").animate({scrollTop:0},b),!1})});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment