PageSourceSearch

https://aspirehealthandfitness.com/wp-content/cache/perfmatters/as….category-swiper-init.min.js?ver=1786026583

js aspirehealthandfitness.com collected 2026-10-04 07:31:18 UTC 4,241 bytes, 10 lines download raw bytes

1jQuery(function($){function initOrUpdateCategorySwiper(){if(typeof window.Swiper==='undefined')return;var $wrap=$('.category-swiper');if(!$wrap.length)return;var el=$wrap.get(0);if(el._categorySwiper&&typeof el._categorySwiper.update==='function'){el._categorySwiper.update();return}
2el._categorySwiper=new Swiper(el,{slidesPerView:'auto',spaceBetween:10,freeMode:!0,watchOverflow:!0,simulateTouch:!0,touchStartPreventDefault:!1,navigation:{nextEl:'.category-swiper-wrapper .swiper-button-next',prevEl:'.category-swiper-wrapper .swiper-button-prev',}})}
3initOrUpdateCategorySwiper();function initStickySidebar(){if(window.innerWidth<1024)return;var sidebar=document.querySelector('.blog-sidebar');var sidebarColumn=document.querySelector('.blog-sidebar-column');var sentinel=document.querySelector('.sidebar-sentinel');var postsWrapper=document.querySelector('.blog-posts-wrapper');if(!sidebar||!sidebarColumn||!sentinel||!postsWrapper)return;var headerOffset=150;var minHeightForSticky=0;var sidebarWidth=sidebarColumn.offsetWidth;function updateSidebarState(){if(window.innerWidth<1024)return;var sidebarHeight=sidebar.offsetHeight;var postsHeight=postsWrapper.offsetHeight;if(postsHeight<sidebarHeight+200||postsHeight<minHeightForSticky){sidebar.classList.remove('is-fixed','is-bottom');sidebar.style.width='';sidebar.style.top='';return}
4var sentinelRect=sentinel.getBoundingClientRect();var postsRect=postsWrapper.getBoundingClientRect();var scrolledPastStart=sentinelRect.top<headerOffset;var sidebarBottom=headerOffset+sidebarHeight;var reachedBottom=postsRect.bottom<sidebarBottom+30;if(!scrolledPastStart){sidebar.classList.remove('is-fixed','is-bottom');sidebar.style.width='';sidebar.style.top=''}else if(reachedBottom){sidebar.classList.remove('is-fixed');sidebar.classList.add('is-bottom');sidebar.style.width=sidebarWidth+'px';sidebar.style.top=''}else{if(!sidebar.classList.contains('is-fixed')){sidebarWidth=sidebarColumn.offsetWidth}
5sidebar.classList.remove('is-bottom');sidebar.classList.add('is-fixed');sidebar.style.width=sidebarWidth+'px';sidebar.style.top=headerOffset+'px'}}
6var ticking=!1;window.addEventListener('scroll',function(){if(!ticking){window.requestAnimationFrame(function(){updateSidebarState();ticking=!1});ticking=!0}},{passive:!0});window.addEventListener('resize',function(){if(window.innerWidth<1024){sidebar.classList.remove('is-fixed','is-bottom');sidebar.style.width='';sidebar.style.top=''}else{sidebarWidth=sidebarColumn.offsetWidth;updateSidebarState()}});updateSidebarState()}
7initStickySidebar();function loadPosts(category,paged,scope){var searchQuery=$('#search-query').val()||'';scope=scope||'';$.ajax({url:ajax_params.ajaxurl,type:'POST',data:{action:'filter_posts_by_category',category:category,paged:paged,scope:scope,search_query:searchQuery},beforeSend:function(){$('#ajax-loader').show();$('#ajax-posts-container').css('opacity','0.5')},success:function(response){$('#ajax-posts-container').html(response).css('opacity','1');$('#ajax-loader').hide();initOrUpdateCategorySwiper();var $target=$('.blog-posts-wrapper');if($target.length){$('html, body').animate({scrollTop:$target.offset().top-150},300)}
8initStickySidebar()},error:function(){$('#ajax-posts-container').html('<p>Something went wrong. Try again.</p>').css('opacity','1');$('#ajax-loader').hide()}})}
9$(document).on('click','.pagination a, .pagination-wrapper a',function(e){e.preventDefault();var pagedMatch=$(this).attr('href').match(/paged=(\d+)/);var paged=pagedMatch?pagedMatch[1]:1;var $activeBtn=$('.category-button.active');var category=$activeBtn.data('cat')||'';var scope=$activeBtn.data('scope')||'';if(!category){category=$('#current-category').val()||$('#archive-category-id').val()||''}
10loadPosts(category,paged,scope)});$('#ajax-category-filter').on('click','.category-button',function(){var category=$(this).data('cat');var scope=$(this).data('scope')||'';$('.category-button').removeClass('active');$(this).addClass('active');loadPosts(category,1,scope)});$('#ajax-category-filter-mobile').on('click','.category-button',function(){var category=$(this).data('cat');var scope=$(this).data('scope')||'';$('.category-button').removeClass('active');$(this).addClass('active');loadPosts(category,1,scope)})})

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.