ruby on rails 3 - add a delay to the focusout jquery -
how can delay $('#header_user_list').html(''); line executing second?
application.js:
$(function() { $("#user_header_search_form input").focusout(function() { $('#header_user_list').html(''); }); });
just use 1 second timeout
$(function() { $("#user_header_search_form input").focusout(function() { settimeout(function(){$('#header_user_list').html('');},1000); }); });
Comments
Post a Comment