Added the Autocomplete plugin

This commit is contained in:
Craig Andrews
2009-08-06 14:39:59 -04:00
parent e386a75d1b
commit 153248b482
115 changed files with 6781 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
$(document).ready(function(){
$.getJSON($('address .url')[0].href+'/api/statuses/friends.json?user_id=' + current_user['id'] + '&lite=true&callback=?',
function(friends){
$('#notice_data-text').autocomplete(friends, {
multiple: true,
multipleSeparator: " ",
formatItem: function(row, i, max){
return '@' + row.screen_name + ' (' + row.name + ')';
},
formatMatch: function(row, i, max){
return '@' + row.screen_name;
},
formatResult: function(row){
return '@' + row.screen_name;
}
});
}
);
});