我正在尝试实施国家/地区预输入示例,但很难加载它。我究竟做错了什么?
JSFiddle在这里:http: //jsfiddle.net/EXgq9/
HTML
<input type="text" class="typeahead" placeholder="Enter your location">
JS
$(document).ready(function() {
$('.typeahead').typeahead({
name: 'countries',
prefetch: 'http://twitter.github.io/typeahead.js/data/countries.json',
limit: 10
});
}