I want to trigger an ajax request when the user has finished typing in a text box. I don\'t want it to run the function on every time the user types a letter because that wo
Simple and easy to understand.
var mySearchTimeout; $('#ctl00_mainContent_CaseSearch').keyup(function () { clearTimeout(mySearchTimeout); var filter = $(this).val(); mySearchTimeout = setTimeout(function () { myAjaxCall(filter); }, 700); return true; });