HOW DO I GET SLIDER TO GO TO SPECIFIC POSITION ON TAP ON IPAD. HTML JAVASCRIPT

Chintoo Semi

Total Post:135

Points:947
Posted by  Chintoo Semi
iPhone 
 1002  View(s)
Ratings:
Rate this:
Hi Expert,

On safari desktop the slider one can click with the mouse to go to specific position on the slider. For instance you can click to go to the end. On the iPad you have to drag it the round ball with your finger to move the position of the slider. I would like on an iPad to be able to tap to get it to a specific position like on the desktop.

The code I'm using for the slider is

<input id = "slider" type="range" min="0" max="45" step="1" value="0" OnChange = "Slider();">

I would like to avoid using jquery but if I have to I will use jquery.

Thanks in advance. 
  1. AVADHESH PATEL

    Post:604

    Points:4228
    Re: How do I get slider to go to specific position on tap on iPad. HTML Javascript

    Hi Chintoo,


    I know you asked for something not JQuery, but you should see how well the slider works. Also to note, an input of type range is not compatible with IE9 and below.

    Fiddle

    $("#slider ").slider({
        min: 0,
        max: 45,
        step:1,
        slide: function (event, ui) {
            $("#amount").val(ui.value);
        }
    });

    Thanks in advance. 

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!