fbpx
Back
User Avatar

Matt

Matthew Harrod is a digital marketing strategist specializing in social media engagement and online brand development. He has significant experience helping businesses amplify their digital presence and connect with target audiences. Matthew brings practical insights and hands-on expertise to his courses.
2 Courses
0 Students
jQuery(document).ready(function($) { var $counterReveal = $('.counter-reveal-duplicate'); var $sectionAbove = $('.counter-reveal'); // Section above the duplicate var $blogCarousel = $('.blog-carousel'); // Section below $(window).on('scroll', function() { var scrollPosition = $(window).scrollTop(); var sectionAboveOffset = $sectionAbove.offset().top; var sectionAboveHeight = $sectionAbove.outerHeight(); var blogCarouselOffset = $blogCarousel.offset().top; // Trigger reveal when scrolled halfway through the section above if (scrollPosition > sectionAboveOffset + (sectionAboveHeight / 2) && scrollPosition < blogCarouselOffset - 100) { $counterReveal.addClass('reveal'); } else { $counterReveal.removeClass('reveal'); } // Manage the hide behavior when scrolling past the blog-carousel if (scrollPosition > blogCarouselOffset) { $blogCarousel.addClass('scrolled-past'); } else { $blogCarousel.removeClass('scrolled-past'); } }); });