The Changelog

Open Source moves fast. Keep up.

jQuery plugin for @mentions autocompletion


A nifty jQuery plugin for providing Facebook/Twitter-like screen name autocomplete for that next great social network you’re building:

  onDataRequest:function (mode, query, callback) {
    var data = [
      { id:1, name:'Kenneth Auchenberg', 'avatar':'', 'type':'contact' },
      { id:2, name:'Jon Froda', 'avatar':'', 'type':'contact' },
      { id:3, name:'Anders Pollas', 'avatar':'', 'type':'contact' },
      { id:4, name:'Kasper Hulthin', 'avatar':'', 'type':'contact' },
      { id:5, name:'Andreas Haugstrup', 'avatar':'', 'type':'contact' },
      { id:6, name:'Pete Lacey', 'avatar':'', 'type':'contact' }

    data = _.filter(data, function(item) { return > -1 });, data);

Check out the project page for options or grab the source.

Have comments? Send a tweet to @TheChangelog on Twitter.

Subscribe to The Changelog Weekly – our weekly email covering everything that hits our open source radar.