Zurb Foundation*酒吧菜单不适用于移动显示屏

时间:2022-12-06 16:57:11

I am using the Zurb Foundation framework on a Wordpress site. The problem that I am having is with the responsive top-bar. When it goes into its mobile mode the menu doesnt work. It will not drop down on click. I have download their html templates, copied the code exactly and still it does not work.

我在Wordpress网站上使用Zurb Foundation框架。我遇到的问题是响应式顶栏。当它进入移动模式时,菜单不起作用。它不会在点击时下降。我已经下载了他们的html模板,完全复制了代码但仍然无效。

Does anyone know how to fix it.

有谁知道如何修理它。

4 个解决方案

#1


5  

I don't think you include the required javascripts for the TopBar component. I couldn't find it in your code.

我不认为你包含TopBar组件所需的javascripts。我在你的代码中找不到它。

Either reference foundation.min.js or jquery.foundation.topbar.js

引用foundation.min.js或jquery.foundation.topbar.js

Then you must initialize the menu with

然后你必须初始化菜单

$(document).foundationTopBar() 

#2


2  

Try loading foundation on DOM Ready.

尝试在DOM Ready上加载基础。

$(function() {
    $(document).foundation();
});

#3


1  

With zurb-foundation-4.0.9 you need to add this line to your html code:

使用zurb-foundation-4.0.9,您需要将此行添加到您的html代码中:

<script type="text/javascript" src="javascripts/vendor/custom.modernizr.js"></script>

#4


0  

try to remove that part then test it. i have my site running on foundation 3. and the top bar is working. i had this issue before. do not include app.js when you are converting your html theme to wordpress theme.

尝试删除该部分然后测试它。我的网站在基础3上运行。顶部栏正在运行。我以前遇到过这个问题。当您将html主题转换为wordpress主题时,请不要包含app.js.

Remove this

<script type="text/javascript" src="http://pinetowncpf.co.za/wp-content/themes/PinetownCPF/js/app.js"></script>

then test

regards eric

#1


5  

I don't think you include the required javascripts for the TopBar component. I couldn't find it in your code.

我不认为你包含TopBar组件所需的javascripts。我在你的代码中找不到它。

Either reference foundation.min.js or jquery.foundation.topbar.js

引用foundation.min.js或jquery.foundation.topbar.js

Then you must initialize the menu with

然后你必须初始化菜单

$(document).foundationTopBar() 

#2


2  

Try loading foundation on DOM Ready.

尝试在DOM Ready上加载基础。

$(function() {
    $(document).foundation();
});

#3


1  

With zurb-foundation-4.0.9 you need to add this line to your html code:

使用zurb-foundation-4.0.9,您需要将此行添加到您的html代码中:

<script type="text/javascript" src="javascripts/vendor/custom.modernizr.js"></script>

#4


0  

try to remove that part then test it. i have my site running on foundation 3. and the top bar is working. i had this issue before. do not include app.js when you are converting your html theme to wordpress theme.

尝试删除该部分然后测试它。我的网站在基础3上运行。顶部栏正在运行。我以前遇到过这个问题。当您将html主题转换为wordpress主题时,请不要包含app.js.

Remove this

<script type="text/javascript" src="http://pinetowncpf.co.za/wp-content/themes/PinetownCPF/js/app.js"></script>

then test

regards eric