views:

50

answers:

3
+2  Q: 

HTML sliding bars?

Hi, how does one create a sliding bar using HTML? I cannot seem to find anything in the official documentation.

+2  A: 

HTML has no direct support for sliding bars, that is added by the browser when the page does not fit the screen. However it is possible to create a sliding bar using JavaScript.

Gabriel Ščerbák
+1  A: 

You could use the JQuery UI Slider

(Yet another JavaScript question that is answered with JQuery)

GvS
+1  A: 

HTML5 does, in fact, have support for sliders:

<input type="range" min="0" max="10" step="2" value="6">

...browsers are expected to render type="range" as a slider control. At time of writing, the latest versions of Safari, Chrome, and Opera all do this. (Sadly, the iPhone renders it as a simple text box. It doesn’t even optimize its on-screen keyboard for numeric input.) All other browsers simply treat the field as type="text", so there’s no reason you can’t start using it immediately. (diveintohtml5.org)

Ryan Kinal