-
Notifications
You must be signed in to change notification settings - Fork 354
Open
Description
<div id="selector"><h3>标题</h3><p>描述</p></div>
touch.bind("#selector", "tap", function(){
//点击标题
console.log(this); // this -> <h3>标题</h3>
});
这个结果明显不是想要的
var e = d.call(a.target, a);
还有一个小小的问题,手册说:
touch.trigger(element, type)
element element或string 元素对象或选择器
并不能接收 string,只能接收 element
try {
"undefined" != typeof CustomEvent ? (d = new CustomEvent(b, e), a && a.dispatchEvent(d)) : (d = document.createEvent("CustomEvent"), d.initCustomEvent(b, !0, !0, c), a && a.dispatchEvent(d))
} catch(f) {
console.warn("Touch.js is not supported by environment.")
}
明显没有处理
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels