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.
我在 photegap 项目中使用 xui,因为它运行良好,除了使用 swipe 插件时,我找不到获取点击元素 id 属性的方法。
谁能帮我解决这个问题?
谢谢
您传递给该swipe方法的回调将作为第一个参数传递给触摸事件对象。
swipe
因此,您可以查看Touch Event 文档,尤其是对象touches数组Touch;这些Touch对象有一个target属性,可以让您直接引用触摸事件开始的元素。
touches
Touch
target