2014-07-02 72 views
0

現在我正在使用data-role=page導航頁面,這意味着該頁面將其他頁面以"page"作爲其數據角色。jquery mobile中的自定義數據角色頁面

是否可以對navigate using a custom data-role有類似「頁面」功能的說,子頁面?

請指教我如何做到這一點。謝謝!所以基本上,main-2應該轉換爲inner-page-2,同樣的方式main轉換爲inner-page-1

<div id="main" data-role="page"> 
content goes here 
</div> 

<div id="inner-page-1" data-role="page"> 
content goes here 
</div> 

<div id="main-2" data-role="subpage"> 
content goes here 
</div> 

<div id="inner-page-2" data-role="subpage"> 
content goes here 
</div> 
+0

你怎麼在代碼執行你的導航? – Sga

+0

編輯我的問題來說明它。謝謝! – Cattarina

回答

0

你可以試試jQuery Mobile Subpage Widget插件。

用法:

Add a stack of child div's with data-role="subpage" or data-role="subpage-dialog" to a parent div with data-role="page"

+0

雖然我的子頁面不在父級div下。 – Cattarina

相關問題