0

My code is here:

http://ivanabilic.mixture.io/nnb/

The top bar adjusts to a dropdown when under 940px, but the toggle does not work at that point. I initialise the topbar script in the footer, but I don't know how to fix this. I think it's a problem with my CSS, but not sure how.

Help? Thanks!

EDIT: This is the navbar code specifically:

    <div class="nav-background">
    <div class="row" id="top">
            <div class="twelve columns">
                    <nav class="top-bar">
                            <ul>
                            <li class="name"><h1><a href="#"><img src="{{ "public/images/logo.png" | root_asset }}" alt="PlusDigital"></a></h1></li>
                            <li class="toggle-topbar"><a href="#"></a></li>
                            </ul>
                            <section>
                            <ul class="right">
                            <li class="active"><a class="home" href="#">
                            <img class="home-icon" src="{{ "public/images/home-icon.png" | root_asset }}" alt="Home"></a></li>
                            <li><a href="#">Web Solutions</a></li>
                            <li><a href="#">Plans &amp; Pricing</a></li>
                            <li><a href="#">Agency Services</a></li>
                            <li><a href="#">Portfolio</a></li>
                            <li><a href="#">Contact</a></li>
                            </ul>
                            </section>
                    </nav>
            </div>
    </div>
    </div>

And this is the initialise of the Javascript:

    <script src="/public/scripts/jquery.foundation.topbar.min.js"></script>
    <script type="text/javascript">$(document).foundationTopBar();</script>
4

1 回答 1

0

我认为问题来自您遇到的失败资源错误:

Failed to load resource: the server responded with a status of 403 (Forbidden) 
 https://s3.amazonaws.com/mixture-projects/1286/nnb/public/styles/app.css
Failed to load resource: the server responded with a status of 403 (Forbidden)  
 https://s3.amazonaws.com/mixture-projects/1286/nnb/public/scripts/app.js

据我所知,您也需要这两个。查看链接是否正确和/或这是正确的服务器。

编辑: 根据基金会文档

我们所有的插件和必要的 Javascript 使 Foundation 正常工作。这里最重要的文件是app.js,用于初始化您可能想要使用的各种插件。

您可以在页面下方找到建议的 HTML 标记结构的示例。

于 2013-01-20T13:13:07.513 回答