JavaScript
Article

javascript catch top scroll trigger

By Sam Deering

Quick javascript snippet to catch top scroll trigger.

var wintop = $(window).scrollTop(), docheight = $(document).height(), winheight = $(window).height();
((wintop/(docheight-winheight)) == 0) //top scroll trigger
Recommended
Sponsors
Get the latest in JavaScript, once a week, for free.