Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML Slider element?

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?

like image 830
Claudiu Avatar asked May 15 '10 01:05

Claudiu


People also ask

What is an HTML slider?

An HTML image slider is a group of boxes that are set in a row that you can navigate between.

Is slider is a HTML5 tag?

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.

How do I add a slider to a form?

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.


2 Answers

There is a slider control in HTML5, it's done with <input type="range" … />.

Check browser support here: http://caniuse.com/input-range

like image 183
Ben Boyle Avatar answered Sep 18 '22 06:09

Ben Boyle


jQuery UI does support this.

If you're already using jQuery, it would be easy to learn.

like image 45
MiffTheFox Avatar answered Sep 22 '22 06:09

MiffTheFox