このコードはjQuery-1.3.2.min.jsで正常に動作しますが、jQuery-1.6.2.min.jsでは動作しません。jQuery 1.6.2 mouseupが実行されない
$(function(){
$(document).mousedown(mouseUpAfterDrag);
function mouseUpAfterDrag(e) {
/* You can record the starting position with */
var start_x = e.pageX;
var start_y = e.pageY;
$().mousemove(function(e) {
/* And you can get the distance moved by */
var offset_x = e.pageX - start_x;
var offset_y = e.pageY - start_y;
});
$().one('mouseup', function() {
alert("This will show after mousemove and mouse released.");
$().unbind();
$(document).mousedown(mouseUpAfterDrag);
});
// Using return false prevents browser's default,
// often unwanted mousemove actions (drag & drop)
return false;
}
});
jQuery-1.6.2.min.jsでこのコードを動作させるにはどうすればいいですか? どのような解決策ですか?
すべてのエラーメッセージは?火かき棒を使ってみてください。 –
「実行しない」とは、正確に何を意味するのですか? – Blazemonger
@ mblase75 mouseupは発砲していません – Raju