PageSourceSearch

https://welcomebreak.co.uk/wp-content/themes/cn-core-theme/dist/js/on-scroll.js

js welcomebreak.co.uk collected 2026-09-25 18:41:53 UTC 1,070 bytes, 1 lines download raw bytes

1var CN=CN||{};CN.OnScroll=function(){this.elements={base:$("body")},this.targetElements=[],this.init()},CN.OnScroll.prototype.init=function(){var e=this;$(window).on("scroll",function(){window.requestAnimationFrame?window.requestAnimationFrame(function(){e.windowScrolled(e.targetElements)}):e.windowScrolled(e.targetElements)}),0<window.pageYOffset&&(window.requestAnimationFrame?window.requestAnimationFrame(function(){e.windowScrolled(e.targetElements)}):e.windowScrolled(this.targetElements))},CN.OnScroll.prototype.addElement=function(e,t,n){t=$(t);0<t.length&&(this.targetElements.push({name:e,element:t,offset:n}),t.wrap('<div class="c-onscroll-wrapper" style="min-height: '+t.height()+'px"></div>'))},CN.OnScroll.prototype.windowScrolled=function(e){var o=$("body"),s=window.pageYOffset,i=$("header.c-page-header").height();40<=s?o.addClass("page-is-scrolled"):o.removeClass("page-is-scrolled"),$.each(e,function(e,t){var n=$(t.element).parent().offset().top;t.offset&&(n+=t.offset),n-i<=s?o.addClass(t.name+"-has-passed"):o.removeClass(t.name+"-has-passed")})};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.