I'm trying to manually trigger a mousemove
event with jQuery. Demo in this fiddle http://jsfiddle.net/qJJQW/
From other similar posts on Stack Overflow it seems that this should work. Why isn't it?
Use jQuery to bind the mousemove event:
$(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);
}