jQuery(window).scroll(function() { var hT = jQuery('div#shopify-section-template--16081634984157__165209878371807727').offset().top, hH = jQuery('div#shopify-section-template--16081634984157__165209878371807727').outerHeight(), wH = jQuery(window).height(), wS = jQuery(this).scrollTop(); if (wS > (hT+hH-wH)){ console.log('H1 on the view!'); } });