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!');
}
});
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter