Skip to content

Instantly share code, notes, and snippets.

@kacinskas
kacinskas / gist:5102801
Last active December 14, 2015 14:49
Simple scroll to top button example
Demo - http://jsfiddle.net/tadas/uRwGX/1/
/* ---------------------------- */
// Scroll to top
/* ---------------------------- */
$(function() {
var $simpleScrollTop=$('#scrolltop');
$(window).scroll(function() {
if($(this).scrollTop() != 0) {