Forgive me here if this is a basic question but I had a look at both multiple sliders and slider range and can't figure out how to combine them so I can have more than one range slider on the page. I currently have this code:
- $(function() {
- $( ".slider-range" ).slider({
- range: true,
- min: 0,
- max: 500,
- values: [ 75, 300 ],
- slide: function( event, ui ) {
- $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[ 1 ] );
- }
- });
- $( "#amount" ).val( "$" + $( ".slider-range" ).slider( "values", 0 ) +
- " - $" + $( ".slider-range" ).slider( "values", 1 ) );
- });
I then have this to display the slider and range:
- <div class="slider">
- <p>
- <label for="amount">Price range:</label>
- <input type="text" id="amount" style="border:0; color:#f6931f; font-weight:bold;" />
- </p>
- <div class="slider-range"></div>
- </div>
But I would then like to add a couple more sliders with different values.
Any help would be greatly appreciated.