FCBKcomplete v 2.7.4
Posted on 23. Feb, 2010 by emposha in Facebook, Javascript, Jquery
Fancy facebook-like dynamic inputs with auto complete & pre added values. If you have any comments or requests, please post them and I will try to include all the requested features in the upcoming release.
Download: Download FCBKcomplete
Demo: Demo FCBKcomplete
GitHub: http://github.com/emposha/FCBKcomplete
Please use github for bug report
Usage:
$("element").fcbkcomplete({
json_url: "fetched.txt",
cache: true,
filter_case: true,
filter_hide: true,
newel: true
});
json_url - url to fetch json object
cache - use cache
height - maximum number of element shown before scroll will apear
newel - show typed text like a element
firstselected - automaticly select first element from dropdown
filter_case - case sensitive filter
filter_hide - show/hide filtered items
filter_selected - filter selected items from list
complete_text - text for complete page
maxshownitems - maximum numbers that will be shown at dropdown list (less better performance)
maxitems - maximum item that can be added to the list
onselect - fire event on item select
onremove - fire event on item remove
delay - delay between ajax request (bigger delay, lower server time request)
Add item public method (how to use):
$(“elem”).trigger(“addItem”,[{"title": "test", "value": "test"}]);
Updates:
- 2.7.4
* standart event change call added on addItem, removeItem
* preSet also check if item have “selected” attribute
* addItem minor fix
- 2.7.3
* event call fixed thanks to William Parry <williamparry!at!gmail.com>
- 2.7.2
* some minor bug fixed
* minified version recompacted due some problems
- 2.7.1
* bug fixed
* ajax delay added thanks to http://github.com/dolorian
- 2.7
* jquery 1.4 compability
* item lock possability added by adding locked class to preadded option <option value=”value” class=”selected locked”>text</option>
* maximum item that can be added
- 2.6.1
* fixed public method to use it $(“elem”).trigger(“addItem”,[{"title": "test", "value": "test"}]);
- 2.6 ie6/7 support fix added
* added new public method addItem due request
* added new options “firstselected” that you can set true/false to select first element on dropdown list
* autoexpand input element added
* removeItem bug fixed
* and many more bug fixed
- 2.5 removed selected=”selected” attribute due ie bug
* element search algorithm changed
* better performance fix added
* fixed many small bugs
* onselect event added
* onremove event added
- 2.02 fixed fist element selected bug
* fixed defaultfilter error bug
- 2.01 fixed bugs & added features
* fixed filter bug for preadded items
* focus on the input after selecting tag
* the element removed pressing backspace when the element is selected
* input tag in the control has a border in IE7
* added iterate over each match and apply the plugin separately
* set focus on the input after selecting tag
- 2.00 new version of fcbkcomplete
* replace regular “select” element with new fancy facebook like selector
* multiple elements support

227 Comments
Cetin
07. Apr, 2010
If I put the Select that I’m using with FCBKcomplete inside a DIV or any other element that has “display: none;”, the list will never appear. When I simple change “none” to “block”, the list display properly.
Ram
07. Apr, 2010
Hi, I tried using your latest version of code. Instead of sending output to action tag of form, i am trying to select them using jquery and send through ajax. How ever, i find that only one value is available to me even if i select two or more. after seeing your code, i used $(‘.selected’).val() to get values from the options. But i am getting only one. Can you please let me know how i can select all the values? I am not that sharp with javascript.
Also, can i use your code in a commercial website?
yogendra
12. Apr, 2010
hi ,
i want to retrieve the value onselect and onremove event.
onremove: “testme”,
onselect: “testme”,
when i add value in FCBk it gives me all value but when i remove value from FCBk the value is same.please help me
thanks
miller
13. Apr, 2010
Does it support Chinese input?
Krokodile
14. Apr, 2010
Thanks for a great job.
Please add an option to disable js script filtering. My case – i use fcbk input to gather set of flight origins ( Moscow, London etc) but site is bilingual – even if user makes input in english ( as i’m used to) server returns origin in russian. For example – i type in english “Mosc” and server returns in russian “Москва” -and filter fails.
krokodile
14. Apr, 2010
problem with focus seems to be still there……
” set focus on the input after selecting tag” is not working
Uzair Khan
26. Apr, 2010
I am using 2.7.4 and onselect isn’t working for me. I need it to keep the focus on the input field which is lost whenever an element is selected.
Leave a reply