Last active
December 11, 2015 07:49
-
-
Save jupegarnica/4569378 to your computer and use it in GitHub Desktop.
typewatch event listener with delay
This file contains hidden or 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
<script src="js/jquery.typewatch.js" type="text/javascript" charset="utf-8" async defer></script> | |
// callback: The function to call | |
// wait: The number of milliseconds to wait after the the last key press before firing the callback | |
// highlight: Highlights the element when it receives focus | |
// captureLength: Minimum # of characters necessary to fire the callback | |
var options = { | |
callback:function(){ alert("changed search text"); }, | |
wait:750, | |
highlight:true, | |
captureLength:2 | |
} | |
$("#search").typeWatch( options ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment