function loadData() { var winURL = window.location.href.split('?')[0]; var queryParams = $("#filterForm").serialize(); var queryURL = winURL + '?' + queryParams; $('#yachts_items').load(queryURL + ' #yachts_items > *', function() { $('#yachts_items').attr('query', queryParams); }); } function handle(e) { e.preventDefault(); loadData(); } $('#filterForm').submit(handle); $('#filterForm select').change(handle); var debounce; $('#filterForm input').on('input', function(e) { clearTimeout(debounce); debounce = setTimeout(function() { handle(e); }, 1000); });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter