Frage

I wrote a widget for selecting date ranges using jQuery because of the easy usage of the selectable plugin, only to find out that it does not work for iPad and iPhone (and presumably other touch devices as well.

Is there any plugin / patch or anything I can use to get the code running on touch devices?

War es hilfreich?

Lösung

http://touchpunch.furf.com/

jQuery UI Touch Punch. It's a hack that turns touch events into click events. Should be perfect for what you're doing. The documentation is super clear and implementation is a simple:

<script type="text/javascript" src="jquery.ui.touch-punch.js"></script>

Give it a try!

EDIT: Fixed a spelling error

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top