我试图将Bootstrap3与令人敬畏的x-editable和typeahead.js集成,但我无法使其工作:
我尝试了以下内容
但没有运气.
HTML代码:
<div style="margin: 150px">
<a href="#" id="username">Rome</a>
</div>
Run Code Online (Sandbox Code Playgroud)
JS代码:
$('#username').editable({
mode: 'inline',
showbuttons: false,
type: 'text',
url: '/post',
pk: 1,
title: 'Enter an Italian city',
typeahead: {
local: ['Rome', 'Milan', 'Venice', 'Florence']
}
});
Run Code Online (Sandbox Code Playgroud)
在这里小提琴:http://jsfiddle.net/Ggxbm/3/
甚至http://vitalets.github.io/x-editable/docs.html#typeaheadjs提供的例子也不适用于我
我究竟做错了什么?