How to create slider for mobile iphone

hi all

i have used this code

 <input type="range" name="slider" id="slider" value="0" min="0" max="100"  /> 

this is not worked in iphone browser but work well in all web browsers , please any one tell why it not worked? or any other solution …

This is the first time I see … input type=“range” … syntax, that must be some recently introduced feature of HTML(5?). No surprise iPhone does not support it then.

  1. Well you could use <select> with <option> from 0 to 100, it will actually scroll nice in the Android, so it is not a bad solution b/c it is easy to implement.

  2. Or just put a plain input box type=text and do some javascript validation, if you feel so.

  3. Or use jQuery and jQueryUI and there is a component in jQuery UI that is called slider if I am not mistaken

Or do something else, there are million ways to solve this problem. Personally, I would try <select> element first. In Android browser, long <option> list is not a problem at all, on the iPhone - I am not so sure.

Anyways,
good luck solving your problem :slight_smile:

can you give example for it , i need like this http://jquerymobile.com/demos/1.0a1/docs/forms/forms-slider.html