当你在图像上进行mousedown时,稍微移动鼠标(mousemove)然后释放(mouseup),不会使用jQuery触发mouseup.
jsfiddle:http://jsfiddle.net/kVFTZ/
为什么是这样?如何在移动图像时使其工作?
最佳答案
很容易修复.添加event.preventDefault();你的mousedown功能.
$(document).on('mousedown',function(event) {
event.preventDefault();
$('#info').text('Now move the mouse and then release');
$('#log').text('mouse down fired');
}).on('mouseup',function() {
$('#log').text('mouse up fired');
});