I have an h1 that is far down a page..
TRIGGER EVENT WHEN SCROLLED TO.
and I want to trigger an alert
You can use jQuery plugin with the inview event like this :
inview
jQuery('.your-class-here').one('inview', function (event, visible) { if (visible == true) { //Enjoy ! } });
Link : https://remysharp.com/2009/01/26/element-in-view-event-plugin