Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ajax_lookup( event ) {
- // Perform an AJAX lookup on $(this).val();
- };
- // Console logging happens on keyup, for every single key
- // pressed, which is WAAAY more often than you want it to.
- $('input').keyup( ajax_lookup );
- // Console logging happens on window keyup, but only after
- // the user has stopped typing for 250ms.
- $('input').keyup( $.debounce( 250, ajax_lookup ) );
Add Comment
Please, Sign In to add comment