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

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -