简体   繁体   English

Bootstrap 3:切换画布导航菜单不起作用

[英]Bootstrap 3: toggle off-canvas navigation menu doesn't work

I have the following issue. 我有以下问题。 I am developing a website using the Bootstrap3 framework to give it a nice responsiveness. 我正在使用Bootstrap3框架开发网站,以使其具有良好的响应能力。 In some of the pages I use the off-canvas navigation menu (example can be found here: http://getbootstrap.com/examples/offcanvas/ ). 在某些页面中,我使用了画布外导航菜单(示例可以在这里找到: http : //getbootstrap.com/examples/offcanvas/ )。 When developing locally, it works perfectly (if I make the screen's width small, the menu disappears, a toggle button appears and when clicked, the menu slides from the right). 在本地进行开发时,它可以完美工作(如果我减小屏幕的宽度,则菜单消失,出现切换按钮,单击该菜单时,菜单将从右侧滑动)。 The problem is when I try to do the same on the server (web hosting: fatcow.com). 问题是,当我尝试在服务器上进行相同操作时(网络托管:fatcow.com)。 The toggle button will not trigger the menu sliding. 切换按钮不会触发菜单滑动。 (here an example video: http://screencast.com/t/8dZoW4gK ) When I use 'Inspect element' on Google Chrome, I see that there is some additional code added to the source code of the page. (这里是一个示例视频: http : //screencast.com/t/8dZoW4gK )当我在Google Chrome上使用“检查元素”时,我发现页面的源代码中添加了一些其他代码。

http://screencast.com/t/59vze3aZd3m http://screencast.com/t/59vze3aZd3m

<script type="text/javascript" src="//ajax.cloudflare.com/cdn-cgi/nexp/abv=2545410587/cloudflare.min.js"></script>

<style type="text/css">.cf-hidden { display: none; } .cf-invisible { visibility: hidden; }</style>

<script data-module="cloudflare/rocket" id="cfjs_block_1313ed8fefd" onload="CloudFlare.__cfjs_block_1313ed8fefd_load()" onerror="CloudFlare.__cfjs_block_1313ed8fefd_error()" onreadystatechange="CloudFlare.__cfjs_block_1313ed8fefd_readystatechange()" type="text/javascript" src="http://esngreece.gr/cdn-cgi/nexp/abv=980862342/cloudflare/rocket.js"></script>

I have no idea why this code is added on the section, but this is the only difference from the localhost, so I suppose there is a js conflict. 我不知道为什么要在本节中添加此代码,但这是与localhost的唯一区别,因此我认为存在js冲突。

Thanks in advance 提前致谢

That looks like Rocket Loader is impacting it. 看起来Rocket Loader正在影响它。 Have you tried turning that off in your CloudFlare Performance Settings? 您是否尝试过在CloudFlare性能设置中将其关闭?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM