Facelist Improved: Facebook Autocompletion JQuery Plugin

I was evaluating all the available JQuery plugins to get a Facebook-like contact autocompletion functionality, and deemed the one by Ian Tearle to be the most complete available. However, most complete does not mean fully done, or bug free, and I learned this the hard way doing an initial implementation on a project I’m doing at work.

Spending all day with the lovely Firebug debugger and testing in both Firefox 3 and IE7, I can say I have it working the way I need it to. My version fixes the following issues:

- Not all results that are returned are displayed

- Duplicate contacts can be inserted

- When searching, the user is not notified that a search is being performed

- The ID was being displayed with the search results, this has now been removed

There is still one lingering issue: the values stored in the hidden field… the plugin needs the trailing comma at the end of the values in order to properly perform backspace deletion. It’s really a minor issue as long as you remember in your code that parses the value, that when exploding the commas, you’ll have to ignore the final array row as it will be blank or null.

Demo

Download

I do not provide any support for my modified plugin, but feel free to leave comments if you hit bugs, and if I have time, I will fix them. I’m also hoping Ian will accept my changes so that I can just do a link to his page for the fix.

Ian Tearle’s Page for the Plugin

Edit: Yay, Ian accepted the changes, and they are now updated on the JQuery Plugin project page! I’ve updated my download link to point to the page.

About these ads

3 thoughts on “Facelist Improved: Facebook Autocompletion JQuery Plugin

  1. Pingback: 9 jQuery Tips to Create Facebook-like Applications | Unemployed Developer

  2. awesome job, but you should add
    background-repeat: no-repeat;

    to this rule:
    .token span.x,
    .token span.x_hover,
    .tokenhover span.x,
    .tokenhover span.x_hover

    cause in some browsers the X-image tiles

  3. Pingback: 10 jQuery tagging widgets « Coding « laurii

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s