1(function($) { 2 3 partdoThemeModule.ajaxLinks = '.widget_klb_product_categories a, .widget_product_status a, .remove-filter a, .widget_layered_nav a, .product-views-buttons a, .woocommerce-pagination a'; 4 5 partdoThemeModule.ajaxFilters = function() { 6 7 partdoThemeModule.$document.pjax(partdoThemeModule.ajaxLinks, '.site-content', { 8 timeout : 5000, 9 scrollTo : false, 10 renderCallback: function(context, html, afterRender) { 11 context.html(html); 12 afterRender(); 13 } 14 }); 15 16 partdoThemeModule.$document.on('submit', '.widget_price_filter form', function(event) { 17 $.pjax.submit(event, '.site-content'); 18 partdoThemeModule.$document.trigger('partdoShopPageInit'); 19 }); 20 21 partdoThemeModule.$document.on('submit', '.widget_search_filter form', function(event) { 22 $.pjax.submit(event, '.site-content'); 23 partdoThemeModule.$document.trigger('partdoShopPageInit'); 24 }); 25 26 partdoThemeModule.$document.on('pjax:error', function(xhr, textStatus, error) { 27 console.log('pjax error ' + error); 28 }); 29 30 partdoThemeModule.$document.on('pjax:start', function() { 31 32 scrollToTop(false); 33 34 var $siteContent = $('.site-content'); 35 36 $siteContent.removeClass('ajax-loaded'); 37 $siteContent.addClass('ajax-loading'); 38 $(".site-content .primary-column .products, nav.woocommerce-pagination").hide(); 39 $('.site-content .primary-column .products').before('<svg class="loader-image preloader" width="65px" height="65px" viewBox="0 0 66 66" xmlns="http://www.w3.org/2000/svg"><circle class="path" fill="none" stroke-width="6" stroke-linecap="round" cx="33" cy="33" r="30"></circle></svg></div>'); 40 }); 41 42 partdoThemeModule.$document.on('pjax:complete', function() { 43 44 $('.site-content').removeClass('ajax-loading'); 45 46 $('.loader-image.preloader').remove(); 47 48 partdoThemeModule.$document.trigger('partdoShopPageInit'); 49 50 $('.site-mask').removeClass('active'); 51 $(".site-mask").css({"opacity": "0", "visibility": "hidden"}); 52 53 }); 54 55 56 partdoThemeModule.$document.on('pjax:end', function() { 57 58 scrollToTop(false); 59 60 var $siteContent = $('.site-content'); 61 62 $siteContent.removeClass('ajax-loading'); 63 $siteContent.addClass('ajax-loaded'); 64 65 }); 66 67 var scrollToTop = function(type) { 68 if (partdo_settings.ajax_scroll === 'no' && type === false) { 69 return false; 70 } 71 72 var $scrollTo = $(partdo_settings.ajax_scroll_class), 73 scrollTo = $scrollTo.offset().top - partdo_settings.ajax_scroll_offset; 74 75 $('html, body').stop().animate({ 76 scrollTop: scrollTo 77 }, 400); 78 }; 79 }; 80 81 $(document).ready(function() { 82 partdoThemeModule.ajaxFilters(); 83 }); 84})(jQuery);
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.