daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Jan 19th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function ajax_lookup( event ) {
  2.   // Perform an AJAX lookup on $(this).val();
  3. };
  4.  
  5. // Console logging happens on keyup, for every single key
  6. // pressed, which is WAAAY more often than you want it to.
  7. $('input').keyup( ajax_lookup );
  8.  
  9. // Console logging happens on window keyup, but only after
  10. // the user has stopped typing for 250ms.
  11. $('input').keyup( $.debounce( 250, ajax_lookup ) );
RAW Paste Data
Top