hof*_*lie 5 html javascript jquery mousemove jquery-events
我正在尝试mousemove使用 jQuery手动触发事件。演示在这个小提琴http://jsfiddle.net/qJJQW/
从 Stack Overflow 上的其他类似帖子来看,这似乎应该有效。为什么不是?
使用jQuery绑定mousemove事件:
$(function () {
$("#test").on("mousemove", youCantHandleTheFunc);
$('#button').click(function () {
$('#test').trigger('mousemove', {type:'custom mouse move'});
});
});
function youCantHandleTheFunc (e,customE) {
if (customE != undefined) {
e = customE;
}
$('#result').html(e.type);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15270 次 |
| 最近记录: |