Search

Search - cap classique

var searchResultsNavigation = function(){var getSearchResults = function($container, url){$('.loading-overlay', $container).show(); $.get(url, function(html){if ( html ){$container.html(html); $('.loading-overlay .spin', $container).spin(); $(window).scrollTop($container.offset().top); }else { alert('Sorry - something went wrong. Please try again later.') }}); }; if ( $('div[id^="search-products"').length ){$('div[id^="search-products"').each(function(){var $search_products = $(this); $search_products.on('click', 'ul.uk-pagination a', function(e){e.preventDefault(); getSearchResults($search_products, $(this).attr('href')); }); $search_products.on('change', '.options #input-limit, .options #input-sort', function(e){e.preventDefault(); getSearchResults($search_products, $(this).val()); }); }); }}; $(window).on('load', function(){searchResultsNavigation(); });