Jac: Comment box name auto completer (jQuery plugin)

Posted on 15/9/08 by Felix Geisendörfer

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:

$('#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

 
&nsbp;