Price Range Filter
A dual-slider price filter with live min/max output.
Requires Bootstrap 5. Add the CDN tags below to your page (styles in
<head>, scripts before </body>). The downloaded file already includes them.<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css"><script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script><div class="card border-0 shadow-sm" style="max-width:340px"><div class="card-body">
<h6 class="fw-bold mb-2">Filter by price</h6>
<div id="prSlider"></div>
<div class="d-flex justify-content-between mt-2 small"><span id="prMin">$0</span><span id="prMax">$500</span></div>
</div></div>var mn=document.getElementById('prMin'),mx=document.getElementById('prMax'),wrap=document.getElementById('prSlider');
wrap.innerHTML='<input type="range" class="form-range" id="prA" min="0" max="500" value="0"><input type="range" class="form-range" id="prB" min="0" max="500" value="500">';
function upd(){var a=Math.min(+prA.value,+prB.value),b=Math.max(+prA.value,+prB.value);mn.textContent='$'+a;mx.textContent='$'+b}
document.getElementById('prA').oninput=upd;document.getElementById('prB').oninput=upd;Free to use.This component uses Bootstrap 5 (linked above). Copy any file, or download a ready-to-open .html page with the CDN links already included.