No products found!
“); } // Add pagination to container if(json[‘pagination’]){ paginationContainer.html(json[‘pagination’]); } else { paginationContainer.empty(); } // hide refine search if sub category filter selected if(mz_filter.inputs.filter(‘[name=”mz_fsc”]:checked’).length || mz_filter.inputs.filter(‘[name=”mz_fq”]’).val()){ $(‘.content-refine-search’).attr(‘style’, ‘display: none !important’); } else { $(‘.content-refine-search’).attr(‘style’, ”); } } }); // Price slider var price_slider = $(“#mz-filter-0 [data-role=’rangeslider’]”).slider({ range: true, min: parseFloat($(‘#mz-filter-0 [name=”mz_fp[min]”]’).attr(‘min’)), max: parseFloat($(‘#mz-filter-0 [name=”mz_fp[max]”]’).attr(‘max’)), values: [parseFloat($(‘#mz-filter-0 [name=”mz_fp[min]”]’).val()), parseFloat($(‘#mz-filter-0 [name=”mz_fp[max]”]’).val())], slide: function( event, ui ) { $(‘#mz-filter-0 [name=”mz_fp[min]”]’).val(ui.values[0]); $(‘#mz-filter-0 [name=”mz_fp[max]”]’).val(ui.values[1]); }, change: function( event, ui ) { // Hide Reset for price if($(‘#mz-filter-0 [name=”mz_fp[min]”]’).val() !== $(‘#mz-filter-0 [name=”mz_fp[min]”]’).attr(‘min’) || $(‘#mz-filter-0 [name=”mz_fp[max]”]’).val() !== $(‘#mz-filter-0 [name=”mz_fp[max]”]’).attr(‘max’)){ $(‘#mz-filter-0 [data-mz-reset=”price”]’).removeClass(‘d-none’); } else { $(‘#mz-filter-0 [data-mz-reset=”price”]’).addClass(‘d-none’); } // Trigger filter change $(‘#mz-filter-0’).change(); } }); $(‘#mz-filter-0 [name=”mz_fp[min]”]’).change(function(){ price_slider.slider(“values”, 0, $(this).val()); }); $(‘#mz-filter-0 [name=”mz_fp[max]”]’).change(function(){ price_slider.slider(“values”, 1, $(this).val()); }); // Show reset all button if filter is selected if($(‘#mz-filter-0 [data-mz-reset]:not(.d-none)’).length){ $(‘[data-mz-reset=”all”]’).removeClass(‘d-none’); } });
Source