Closed kilianc closed 12 years ago
you wanna do the request using jsonp?
jsonp / iFrame(ish) / websocket You can provide a simple interface to implement, so people can wrap their own data model :)
ok cool, now you can pass a function as the data. This source function will receive the inputed text as the first argument and the second argument will be a callback that should be called with the data as it's first argument, like this:
var autocomplete = new Meio.Autocomplete($('input-id'), function(text, complete) {
// here you could create a request the way you want
// you just need to call the complete function with the data
complete(['some', 'other']);
});
Thank you very much!
@fabiomcosta as usual you are super awesome! I am going to use it with socket.io :)
wow thank you man! this comment made my day :)
would be super nice to separare the request from the plug-in passing some handler