微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

jquery – 获取错误:未捕获TypeError:undefined不是一个函数bootstrap.js:29(匿名函数)bootstrap.js:29(匿名函数)

我收到以下错误
Uncaught TypeError: undefined is not a function bootstrap.js:29
(anonymous function) bootstrap.js:29
(anonymous function)

在我的visualforce页面在开发者控制台。我想在Visualforce中集成twitter-bootstrap

这是完整的视觉力代码

<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的链接

任何人可能会对可能出了什么问题提出一些看法。

解决方法

您需要包括jquery之前包括引导js文件
<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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐