December 10, 2020 By danny.carvalho@ymail.com Off

Shop Specialty Hand Sanitizers & Travel Hand CleansersOnline in Canada

[]

Specialty Hand Sanitizers & Travel Hand Cleansers

Advertisement

‘); } else { $(‘.ajax_facet_grid’).html(‘Loading Products…
‘); } var url = window.location.href; url = url.replace(/&?display_pages=[0-9]+/g, ”); if (url[url.length-1] == ‘?’) { url = url.substr(0, url.length-1); } separator = url.indexOf(‘?’) === -1 ? ‘?’ : ‘&’; if (typeof next_page !== ‘undefined’) { url += separator + ‘display_pages=’ + next_page; } window.history.replaceState(history.state, window.title, url); $.ajax({ type: “GET”, url: “/ajax_index.php?main_page=category_leaf&action=update_product_grid”, data:{ _search_facet_flag_facet_cur: all_checked_flags, _search_facet_brand_facet_cur: all_checked_brands, sort: sort_by, current_category_id: 5769, price_start: min_price, price_end: max_price, page: next_page }, dataType: “json”, success: function(result, textStatus) { if(activateInfiniteScroll) { // REFERENCE: http://www.powerhour.at/devblog/reset-jquery-infinitescroll-after-ajax-call/ var $infiniteScrollContainer = $(‘#infinite_scroll_section’); // Reset the plugin before intializing it again $infiniteScrollContainer.infinitescroll(‘destroy’); $infiniteScrollContainer.data(‘infinitescroll’, null); // Initialize plugin $infiniteScrollContainer.infinitescroll( { state: { isDestroyed: false, isDone: false, isDuringAjax : false } } ); } msg = result.body; if (typeof next_page != “undefined”) { $(‘#product_load_gif’).remove(); $(‘.ajax_facet_grid’).append(msg); } else { $(‘.ajax_facet_grid’).html(msg); } if(activateInfiniteScroll) { $(‘.ajax_facet_grid’).append(‘]]>’); //call the methods you need on the container again. $(‘#categories_main_content’).infinitescroll ({ navSelector : “#infinite_scroll_trip”, nextSelector : “#next”, itemSelector : “#categories_main_content”, dataType : “html”, img : “”, bufferPx : 400, msgText : “loading…”, debug : false, animate : false }); } }, error: function(request, error_string, e) { $(‘.ajax_facet_grid’).html(‘There was an error loading products.’); }, timeout: 30000 }); } // Caclulate a page to pass into the ajax call and then handle it like a normal page click. $(‘.ajax_facet_grid’).on(‘click’, ‘.loadBtn’, function(){ var next_page = parseInt(2) + load_page_count; handleFacetClick(next_page) load_page_count++; }); $(‘.mobile-checkbox :checkbox’).on(‘change’, function(){ // Toggle corresponding desktop checkbox — must be done so that the ajax update works var desktop_label = $(this).prop(‘id’).substring(2); toggleCheck($(‘#’ + desktop_label)); handleFacetClick(); }); $(‘.desktop-checkbox :checkbox’).on(‘change’, function(){ // Toggle corresponding mobile checkbox — for visual consistency var mobile_label = ‘m_’ + $(this).prop(‘id’); toggleCheck($(‘#’ + mobile_label)); handleFacetClick(); }); $(‘.search_result_sort_facet’).on(‘change’, function() { // Toggle mobile sort link for display var sort_id = ‘#m_’ + $(this).val(); toggleMobileSortFacet($(sort_id)); handleFacetClick(); }); $(‘.m_sort_facet’).on(‘click’, function() { // Toggle sort link for display toggleMobileSortFacet($(this)); var new_sort_val = $(this).prop(‘id’).substring(2); $(‘.search_result_sort_facet’).val(new_sort_val); handleFacetClick(); }); $(‘.btnClear’).on(‘click’, function() { clearAllFilter(); handleFacetClick(); }); // RESPONSIVE BREAK POINT (function($, document, window, viewport){ var globalBreakPoint = function() { // Executes only in XS breakpoint if( viewport.is(“xs”) ) { } if( viewport.is(“md”) ) { } // Executes in SM, MD and LG breakpoints //if( viewport.is(‘>=sm’) ) { // This script below only work for desktop version jQuery(“#Slider2”).slider({ from: 2, to: 32, step: 1, smooth: true, dimension: ‘ $’, skin: “round”, callback: function() { handleFacetClick(); } }); //} // sm }; // Executes once whole document has been loaded $(document).ready(function() { globalBreakPoint(); clearAllFilter(); }); $(window).resize( viewport.changed(function(){ globalBreakPoint(); }) ); // For some reason, $(document).ready is not triggered on IE11 // Use $(window).load to make sure the slider gets initialized $(window).on(‘load’, function(){ globalBreakPoint(); }); })(jQuery, document, window, ResponsiveBootstrapToolkit);

Source