I'm coding an app (temporarily up here), and I want to make its parameters modifiable. I feel the best way to do this would be with your standard GUI slider elements (a la this, but not so ugly). I just noticed that the DOM doesn't provide these, however...
What's the best way to introduce sliders to a webpage? Is there a standard library that everybody uses? Should I just roll my own? Or should is there a different element I can use? Should I embed them in the canvas element somehow?
An HTML image slider is a group of boxes that are set in a row that you can navigate between.
HTML5 brought a lot of new tags and new rules on how the old ones should be used. One of them is the range input element, or the slider.
Create an <input> element under the form element. Use the type attribute with the <input> element. Set the type attribute to value “range”. We can also use the min, max, step, and value attributes to set the restrictions on Range Slider.
There is a slider control in HTML5, it's done with <input type="range" … />.
Check browser support here: http://caniuse.com/input-range
jQuery UI does support this.
If you're already using jQuery, it would be easy to learn.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With