![](/img/trans.png)
[英]Uncaught TypeError: data[option] is not a function bootstrap.js:1215
[英]Getting error : Uncaught TypeError: undefined is not a function bootstrap.js:29 (anonymous function) bootstrap.js:29 (anonymous function)
我收到以下錯誤
Uncaught TypeError: undefined is not a function bootstrap.js:29
(anonymous function) bootstrap.js:29
(anonymous function)
在我visualforce
在開發者頁面console.I'm試圖整合twitter-bootstrap
在Visualforce
這是完整的視覺力量代碼
<apex:page standardStylesheets="false" showHeader="false" sidebar="false">
<!-- Begin Default Content REMOVE THIS -->
<head>
<apex:stylesheet value="{!URLFOR($Resource.bootstrap, 'bootstrap/css/bootstrap.css')}"
/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"
type="text/javascript"></script>
<apex:stylesheet value="{!URLFOR($Resource.bootstrap, 'bootstrap/css/bootstrap.min.css')}"
/>
<apex:includeScript value="{!URLFOR($Resource.bootstrap, 'bootstrap/js/bootstrap.js')}"
/>
<apex:includeScript value="{!URLFOR($Resource.bootstrap, 'bootstrap/js/bootstrap.min.js')}"
/>
</head>
<body>
<div id="force">
<div class="input-append" align="center" style="padding-top:20px;">
<input type="text" name="q" class="span2 search-query" placeholder="Snipp or Tag"
/>
<button type="submit" class="btn">Search</button>
<div class="pull-right">
<button class="btn btn-primary active"><i class="icon-white icon-plus"></i> A</button>
kjhkjdfgdgdfgdfgdfgdfgdgfgdfg
<button class="btn btn-primary active"
style="margin-right:50px;"><i class="icon-white icon-bullhorn"></i> Fee</button>
</div>
</div>
</div>
</body>
</apex:page>
這是jady-developer-edition.ap1.force.com
頁面的jady-developer-edition.ap1.force.com
任何人都可以對可能出錯的事情有所了解。
在包含bootstrap js-file之前,您需要包含jquery。
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" src="/resource/1358914798000/bootstrap/bootstrap/js/bootstrap.js"></script>
請注意,您不需要bootstrap.js和bootstrap.min.js
如果您在jquery.js
之前包含bootstrap.js
,則可能會導致此問題。 因此,請確保在bootstrap
之前包含jQuery
。
還有其他事情需要檢查。
另外一個可能的情況是,頁面中可能有多個jQuery實例。 因此,搜索jQuery的重復版本,如果有的話,刪除它們。
查找以下鏈接以獲取更多信息。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.