[ js ] 新手请教 typeahead .js

楼主: ScottOAO (cos)   2015-07-07 00:03:01
请问typeahead 要如何借由query来存取 JSONP?
另外,我甚至连
<script>
$('.typeahead').typeahead({
source: function (inputquery, process) {
return process(["aaa", "abb", "acc", "aa"]);
// return ["aaa", "abb", "acc", "aa"];
}
});
</script>
<input type="text" name="name" class="form-control typeahead" placeholder="Blah">
也无法正常运作,请问各位要如何解决阿OTZ
stackoverflow发问网址:
http://stackoverflow.com/questions/31247490/twitter-typeahead-dynamic-source-from-parse-com
补上我的Solution: http://git.io/vqELF
作者: crossdunk (推嘘自如)   2015-07-07 11:24:00
安安请缩个网址先看了一下网页,有很多范例了,感觉跟你的不太一样
作者: CrazyAngel (无口系天然呆)   2015-07-07 13:52:00
你用的似乎是旧版,试试新版可以把source分离

Links booklink

Contact Us: admin [ a t ] ucptt.com