JavaScript
Article
By Sam Deering

javascript catch top scroll trigger

By Sam Deering

Quick javascript snippet to catch top scroll trigger.

--ADVERTISEMENT--

var wintop = $(window).scrollTop(), docheight = $(document).height(), winheight = $(window).height();
((wintop/(docheight-winheight)) == 0) //top scroll trigger
Login or Create Account to Comment
Login Create Account
Recommended
Sponsors
Get the most important and interesting stories in tech. Straight to your inbox, daily.