I have a keyup event bound to a function that takes about a quarter of a second to complete.
keyup
$(\"#search\").keyup(function() { //code that tak
Take a look at jQuery Debounce.
$('#search').keyup($.debounce(function() { // Will only execute 300ms after the last keypress. }, 300));