You are here

js

scroll() to top

$(document).scroll(function(){
var percent = 20;
var height = $(document).height();
var point = height / 100 * percent;
var row = $('.header-nav'), scrollTop = $(this).scrollTop();
if(scrollTop > point)
{
row.css({"padding-top":"18px"});
}
else if (scrollTop <= point)
{
row.css({"padding-top":"0"});
}
});

Pages