jQuery UI sliders on touch devices

I was using jQuery UI range slider and it was working on desktop very well but my website was responsive and working very well on touche devices. But jQuery UI sliders on touch devices appear to be incompatible when viewed on Ipad and Iphone. So I googled on this issue and found a solution which am explaining here.

There is a jquery.ui.touch-punch plugin which enable jQuery UI components touch compatible. You can find this at https://github.com/furf/jquery-ui-touch-punch#readme.
Here is some example code for using it :

This Touch-punch will work fine for IOS and Android devices. But the slider will not work on Windows mobile devices, as far is I could test(with the latest versions of jquery ui & Touch punch).
But there is a fix by just adding the following CSS-rules to the .ui-slider-handle:

You Might Interested In

3 COMMENTS

  1. Thomas says:

    Thanks for the tutorial. However if I follow the tip to use ‘.ui-slider-handle’ instead of “#widget” then I can move the slider-handle all around the screen!!!

    Reply

Leave a Reply

Enclose a code block like: <pre><code>Your Code Snippet</code></pre>.