问题
Hi I have previously opened this thread How to tag users in feed like Facebook or Twitter does?. I am working with jquery autocomplete & so far I have this code with me.
Now when I am entering @user-name the suggestions are appearing. But when I hit spacebar the suggestions still remain there. Ideally suggestions should disappear as I hit space bar as we experience in facebook. Please help me to get the ideal behaviour. Thank you!
回答1:
Edit your code to add one more line to else
scope on line number 45
else
{
$( "#birds" ).blur().focus();
return false;
}
I'm sure it will fix the problem.
来源:https://stackoverflow.com/questions/7886140/jquery-ui-autocomplete-suggestion-are-not-closing-after-entering-space-between-t