There is my code that I want to alert “test” once when mousemove , and then remove the mousemove event , but i use unbind() seem not work, can somebody help me ??
$(document).ready( function(){
$(document).mousemove( function(){
alert( "test" );
$(document).unbind("mousemove");
});
});
Simply use $.one() to bind a one-time use event handler.