2
<script type="text/javascript">
$(document).ready(function(){
$('input').typeahead({
name: 'accounts',
local: []//here my data
});
});
</script>
<title>Search Service</title>
</head>
<body style="background-color: black; color: white;">
<div class="container">
<div class="col-lg-12" style="height: 100px;"> </div>
<div class="col-lg-12">
<div class="col-lg-2"></div>
<div class="col-lg-8">
<section class="webdesigntuts-workshop">
<form action="" method="">
<input type="search" placeholder="Search...">
<input type="text" id="service" placeholder="Services" autocomplete="off">
<button>Search</button>
</form>
</section>
</div>
<div class="col-lg-2"></div>
</div>
</div>
</body>
</html>
這是我簡單的示例代碼。我已經爲腳本加載添加了bootstrap.min.js和typeahead.js。它們都在瀏覽器中正確加載。但提前引導類型不起作用。引導類型前面不起作用
你使用的是什麼版本的Bootstrap?你正在使用什麼版本的Typeahead? – cfnerd 2015-05-18 21:18:39