Create an autocompleter like the Facebook status update

Posted by Terw on Stack Overflow See other posts from Stack Overflow or by Terw
Published on 2010-05-30T18:16:51Z Indexed on 2010/05/30 18:22 UTC
Read the original article Hit count: 343

Filed under:
|
|

Hello

I'm trying to create a div with contenteditable like the Facebook status update. Then I mean I want to show an autocomplete box when the user have written @.

How would you do that. Currently I'm just playing with keypress and check if the keycode = 64. Somehow that works, but it doesn't validate if there's a space before the alfa, or if the user has unfocused the box, then focused it again.

Any ideas? Or do you know about any plugin that works something like that?

Tnx

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery