<legend id='Y0NJv'><style id='Y0NJv'><dir id='Y0NJv'><q id='Y0NJv'></q></dir></style></legend>
    <tfoot id='Y0NJv'></tfoot>

      <i id='Y0NJv'><tr id='Y0NJv'><dt id='Y0NJv'><q id='Y0NJv'><span id='Y0NJv'><b id='Y0NJv'><form id='Y0NJv'><ins id='Y0NJv'></ins><ul id='Y0NJv'></ul><sub id='Y0NJv'></sub></form><legend id='Y0NJv'></legend><bdo id='Y0NJv'><pre id='Y0NJv'><center id='Y0NJv'></center></pre></bdo></b><th id='Y0NJv'></th></span></q></dt></tr></i><div id='Y0NJv'><tfoot id='Y0NJv'></tfoot><dl id='Y0NJv'><fieldset id='Y0NJv'></fieldset></dl></div>
        • <bdo id='Y0NJv'></bdo><ul id='Y0NJv'></ul>
      1. <small id='Y0NJv'></small><noframes id='Y0NJv'>

        如何检查 Twitter 引导程序是否已加载?

        How to check if Twitter bootstrap is loaded?(如何检查 Twitter 引导程序是否已加载?)

          <bdo id='EfeOc'></bdo><ul id='EfeOc'></ul>
          <legend id='EfeOc'><style id='EfeOc'><dir id='EfeOc'><q id='EfeOc'></q></dir></style></legend>

            <tfoot id='EfeOc'></tfoot>

                  <tbody id='EfeOc'></tbody>
                <i id='EfeOc'><tr id='EfeOc'><dt id='EfeOc'><q id='EfeOc'><span id='EfeOc'><b id='EfeOc'><form id='EfeOc'><ins id='EfeOc'></ins><ul id='EfeOc'></ul><sub id='EfeOc'></sub></form><legend id='EfeOc'></legend><bdo id='EfeOc'><pre id='EfeOc'><center id='EfeOc'></center></pre></bdo></b><th id='EfeOc'></th></span></q></dt></tr></i><div id='EfeOc'><tfoot id='EfeOc'></tfoot><dl id='EfeOc'><fieldset id='EfeOc'></fieldset></dl></div>

                <small id='EfeOc'></small><noframes id='EfeOc'>

                • 本文介绍了如何检查 Twitter 引导程序是否已加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何检查页面上是否加载了 bootstrap.js 文件(bootstrap.js 文件本身可能会被编译/缩小为另一个更大的 JS文件)?

                  How can I check whether there is a bootstrap.js file loaded on a page (the bootstrap.js file itself may be compiled/minified into another, bigger JS file)?

                  推荐答案

                  您需要做的只是检查 Bootstrap 特定的方法是否可用.我将在此示例中使用模态(适用于 Bootstrap 2-4):

                  All you need to do is simply check if a Bootstrap-specific method is available. I'll use modal in this example (works for Bootstrap 2-4):

                  // Will be true if bootstrap is loaded, false otherwise
                  var bootstrap_enabled = (typeof $().modal == 'function');
                  

                  它显然不是 100% 可靠的,因为模态函数可以由不同的插件提供,但它仍然可以完成这项工作......

                  It is not 100% reliable obviously since a modal function can be provided by a different plugin, but nonetheless it will do the job...

                  您还可以更具体地检查 Bootstrap 3-4(从 3.1+ 开始工作):

                  You can also check for Bootstrap 3-4 more specifically (works as of 3.1+):

                  // Will be true if Bootstrap 3-4 is loaded, false if Bootstrap 2 or no Bootstrap
                  var bootstrap_enabled = (typeof $().emulateTransitionEnd == 'function');
                  

                  请注意,所有这些检查都要求 jQuery 已加载.

                  Note that all of these checks require that jQuery is already loaded.

                  这篇关于如何检查 Twitter 引导程序是否已加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Pause youtube video, youtube api(暂停 youtube 视频,youtube api)
                  Youtube iframe api not triggering onYouTubeIframeAPIReady(Youtube iframe api 未触发 onYouTubeIframeAPIReady)
                  How can I stop a video with Javascript in Youtube?(如何在 Youtube 中停止使用 Javascript 的视频?)
                  Embed YouTube video - Refused to display in a frame because it set #39;X-Frame-Options#39; to #39;SAMEORIGIN#39;(嵌入 YouTube 视频 - 拒绝显示在框架中,因为它将“X-Frame-Options设置为“SAMEORIGIN)
                  How to call Greasemonkey#39;s GM_ functions from code that must run in the target page scope?(如何从必须在目标页面范围内运行的代码中调用 Greasemonkey 的 GM_ 函数?)
                  How do you mute an embedded Youtube player?(如何使嵌入式 Youtube 播放器静音?)

                  1. <small id='VvmCa'></small><noframes id='VvmCa'>

                    <tfoot id='VvmCa'></tfoot>

                      • <bdo id='VvmCa'></bdo><ul id='VvmCa'></ul>

                      • <i id='VvmCa'><tr id='VvmCa'><dt id='VvmCa'><q id='VvmCa'><span id='VvmCa'><b id='VvmCa'><form id='VvmCa'><ins id='VvmCa'></ins><ul id='VvmCa'></ul><sub id='VvmCa'></sub></form><legend id='VvmCa'></legend><bdo id='VvmCa'><pre id='VvmCa'><center id='VvmCa'></center></pre></bdo></b><th id='VvmCa'></th></span></q></dt></tr></i><div id='VvmCa'><tfoot id='VvmCa'></tfoot><dl id='VvmCa'><fieldset id='VvmCa'></fieldset></dl></div>
                        <legend id='VvmCa'><style id='VvmCa'><dir id='VvmCa'><q id='VvmCa'></q></dir></style></legend>
                              <tbody id='VvmCa'></tbody>