0

我是 Foundation 4 的新手,目前正在尝试执行以下操作:

我正在使用section-container Horizo​​ntal-nav并且想知道是否有人知道默认情况下让 section 容器首先显示其内容而不是隐藏它直到被点击的配置?因此,当页面加载时,该部分将首先显示,直到用户单击“第 1 部分”。

 <div class="section-container horizontal-nav" data-section="horizontal-nav">
 <section>
<p class="title" data-section-title>
    <a href="#">Section 1 </a>
</p>
<div class="content" data-section-content>
  <ul class="side-nav">
    <li><a href="#">Link 1</a></li>
    <li><a href="#">Link 2</a></li>
    <li><a href="#">Link 3</a></li>
    <li class="divider"></li>
    <li><a href="#">Link 1</a></li>
  </ul>
</div>

4

2 回答 2

0

The section is placed as a horizontal nav-bar and I'd like for it to be shown when the page loads as if the user has already clicked on it.

You can achieve this by giving you menu items an id and open that menu in jquery.

<a href="#" id="menu1">Section 1 </a>

then add this to the script section of your page:

$(function () {
    $("#menu1").click();
});
于 2013-04-24T01:17:13.703 回答
0

尝试将 active 添加到类属性中?

<div class="content active" data-section-content>
于 2013-04-22T22:25:35.333 回答