mousemove/mouseup

fix for a bug in chrome where mouseup event fires mousemove.

by p337

HTML

<div id="box"></div>

CSS

div {
    width: 100px;
    height: 100px;
    border: 1px solid black;
}

JavaScript

$('#box').bind('mousemove', moved);

function moved() {
    console.log('mousemove');
}

$('#box').mousedown(function (ev) {
    console.log("mousedown");
});

$('#box').mouseup(function () {
    $("#box").unbind("mousemove");
    console.log("mouseup");
    setTimeout(function () {
        $("#box").bind("mousemove", moved);        
    }, 1);
});