2013-10-14 19 views
0

我想在我的Firefox OS的應用程序做一個抽屜菜單,總部設在從Firefox團隊BULDING塊:的Firefox OS從積木抽屜得到選擇

http://buildingfirefoxos.com/building-blocks/drawer.html

目前,我有顯示和隱藏菜單的菜單按鈕,但當用戶單擊菜單中的其他項目時,我無法切換到其他頁面。

有了這個代碼,我可以看到1,當應用開始,但第2頁沒有加載,當我在菜單中選擇按鈕「2頁」

<section id="index" data-position="current"> 
    <section data-type="sidebar"> 
    <header> 
     <menu type="toolbar" /> 
     <a href="#"></a> 
     </menu> 
     <h1>My Menu</h1> 
    </header> 
    <nav> 
     <ul> 
      <li> 
       <a href="#page1">page 1</a> 
      </li> 
      <li> 
       <a href="#page2">page 2</a> 
      </li> 
     </ul> 
    </nav> 
</section> 

<!-- Page 1 --> 
<section id="drawer" class="skin-dark" role="region"> 
    <header class="fixed"> 
     <a href="#"><span class="icon icon-menu">hide sidebar</span></a> 
     <a href="#drawer"><span class="icon icon-menu">show sidebar</span></a> 
     <h1>Page 1</h1> 
    </header> 
    <article class="content scrollable header"> 
     <section id="page1_list" data-type="list"></section> 
    </article> 
</section> 

<!-- Page 2 --> 
<section id="drawer" class="skin-dark" role="region"> 
    <header class="fixed"> 
     <a href="#"><span class="icon icon-menu">hide sidebar</span></a> 
     <a href="#drawer"><span class="icon icon-menu">show sidebar</span></a> 
     <h1>Page 2</h1> 
    </header> 
    <article class="content scrollable header"> 
     <section id="page2_list" data-type="list"></section> 
    </article> 
</section> 

回答