I presently have a search module that submits as a regular html form. In it, I currently fetch an absolute minimum and maximum value for products, for example 50 and 2500. Now I need to build a slider with two buttons (to select a range) and when the form is submitted, both these user-selected values need to be sent, preferrably as two different variables. I am not familiar with how to do such a thing, any ideas?
Thank you!
Edit: http://jqueryui.com/demos/slider/
This format would be ideal, however I was not able to even implement the slider, let alone send 2 values with it. If someone can help with implementation of the above slider, or suggest a different slider method it would be very helpful.
Why weren't you able to implement the jQuery UI slider? Here are the steps I take to including jQueryUI plugins.
- Link to jQuery
- Link to jQueryUI
- Link jQueryUI stylesheet
- Create HTML
div id="slider">
5 . Create JS
$(function(){
$('#slider').slider({
min: 50,
max: 2500
});
});
来源:https://stackoverflow.com/questions/7406297/min-max-slider-to-form