简体   繁体   中英

Min Max slider to form

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.

  1. Link to jQuery
  2. Link to jQueryUI
  3. Link jQueryUI stylesheet
  4. Create HTML

div id="slider">

5 . Create JS

$(function(){  
     $('#slider').slider({  
          min: 50,  
          max: 2500
     });     
});  

http://jsfiddle.net/aHFwP/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM