Created
August 3, 2010 14:33
-
-
Save dandelionmood/506473 to your computer and use it in GitHub Desktop.
Attendre X millisecondes avant d'effectuer une opération Javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Event.observe(window, 'load', function() { | |
var timer; | |
$('recherche').observe('keyup', function() { | |
clearInterval(timer); | |
timer = setInterval( | |
function() { | |
clearInterval(timer); | |
// Suite des opérations ici ... | |
}, | |
100 // Délai avant d'effectuer l'opération. | |
); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment