Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我编写了一个使用 jQuery 选择日期范围的小部件,因为可选插件易于使用,但发现它不适用于 iPad 和 iPhone(可能还有其他触摸设备。
是否有任何插件/补丁或任何我可以用来让代码在触摸设备上运行的东西?
http://touchpunch.furf.com/
jQuery UI 触摸打孔。这是一种将触摸事件转换为点击事件的技巧。应该非常适合您正在做的事情。文档非常清晰,实现很简单:
<script type="text/javascript" src="jquery.ui.touch-punch.js"></script>
试试看!
编辑:修复了拼写错误