我試圖把我自己的exampleahead.js(http://twitter.github.io/typeahead.js/examples/)的例子放在一起,由於某種原因,我無法讓它工作。我的typeahead,js例子有什麼問題?
小提琴:http://jsfiddle.net/A8P3C/
我已經包括了我的JSON,它應該從源代碼中的「本地」調用加載。
<div class="example example-degrees">
<h2 class="example-name">Degrees</h2>
<div class="demo">
<input class="typeahead" type="text" placeholder="degrees">
</div>
$(document).ready(function() {
$('.countries .typeahead').typeahead({
name: 'degrees',
local: ["Bachelor of Science","Bachelor of Science in Accounting","Bachelor of Science in Business","Bachelor of Science in Business\/Accounting","Bachelor of Science in Business\/Administration","Bachelor of Science in Business\/Communications","Bachelor of Science in Business\/e-Business","Bachelor of Science in Business\/Finance","Bachelor of Science in Business\/Global Business Management","Bachelor of Science in Business\/Green and Sustainable","Bachelor of Science in Business\/Green and Sustainable Enterprise Management","Bachelor of Science in Business\/Hospitality Management","Bachelor of Science in Business\/Human Resource Management"]
});
我想我可能只是設置一個簡單的例子,但我不能讓它工作
TIA
Thanks!我知道這是簡單的 – weggie
似乎jsFiddle不再起作用? :( – hlyates