Jac: Comment box name auto completer (jQuery plugin)

Posted by Felix Geisendörfer, on Sep 15, 2008 - in JavaScript & jQuery

Hey folks,

this is post #26 of my 30 day challenge.

For those not familiar with it: A while ago Tim had the wonderful idea of adding an IRC-like auto completion feature to the comment box of our blog. Whenever you start to type in the name of a previous commenter on our blog and then hit tab, his full name will magically appear.

Download & Docs: You can download & read about the jac plugin at the Debuggable Scraps repository as usual.

Usage is as simple as it gets. The code for powering the input box on our blog looks as simple as this:

javascript
  1. $('#comment-box').jac({items: 'strong.author-name'});

This will auto-magically scrap all author name's from the DOM and offer them as auto completions when the tab key is hit.

Comments and ideas for improvement are welcome as always!

-- Felix Geisendörfer aka the_undefined

Print this Post | Digg This | Stumble It | Delicious

8 Comments

Cawlin on Sep 15, 2008:

Can't seem to find a demo, unless each commenter after me can autocomplete!

Felix Geisendörfer on Sep 15, 2008:

Cawlin: Try any other post with more comments : ).

Cawlin on Sep 15, 2008:

Ah there it is. Some sort of visual que would certainly make it more obvious/useful. But very cool none the less.

Joe Beeson on Sep 15, 2008:

It would be neat if you could tab through multiple matches if you put in text that matched many users.

Matteo on Sep 16, 2008:

Nice, let me try it :)

Felix Geisendörfer on Sep 16, 2008:

Joe Beeson: That'd be neat indeed, I added it to the feature wish list, when I find some time I'll implement it. Meanwhile anybody can fork the project and hack something together themselves: ).

Sahil on Dec 26, 2008:

Can't seem to find a demo, unless each commenter after me can autocomplete

Sahil on Dec 26, 2008:

ya it us very
good

Add a comment