我是一位有抱负的网页设计师,我自己学习,独自练习。现在我正在创建一个分类广告主题设计。
我想应用twitter bootstrap js plugin typeahed,我想要完成的只是设置插件,只是放一些虚拟源数据。
This is my html markup below:
<form class="well form-horizontal">
<input class="city span3" type="text" data-provide="typeahead"/>
</form>
<form class="well form-horizontal">
<input class="city span3" type="text" data-provide="typeahead"/>
</form>
and this is what I type for the script... bye the way, I don't have deep understanding yet about jQuery or javascript. $(function() {$(".city").typeahead({ source: ["Youtube","Facebook","Yahoo"] }) });
答案 0 :(得分:0)
试试这个:
$('.city').typeahead({
source: ['Youtube', 'Facebook', 'Yahoo']
});