我想使用jQuery Mobile顯示彈出式菜單,但是彈出式菜單有問題。 的HTML標記看起來是這樣的:JQueryMobile彈出式菜單樣式不正確
<div data-role="popup" id="confirmDialog" data-overlay-theme="a" data-theme="c" style="max-width:400px;" class="ui-corner-all">
<div data-role="header" data-theme="a" class="ui-corner-top">
<h1>Delete Page?</h1>
</div>
<div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
<h3 class="ui-title">Are you sure you want to delete this page?</h3>
<p>This action cannot be undone.</p>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-theme="c">Cancel</a>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-transition="flow" data-theme="b">Delete</a>
</div>
</div>
(順便說一句,這個代碼是從jQuery Mobile的網站複製)。
當我使用.popup('open')方法打開彈出窗口時,標題(刪除頁面?)和按鈕不是樣式的。標題顯示爲常規文本,並且按鈕顯示爲常規鏈接。
什麼會導致此行爲?
謝謝!
那麼,你的代碼給了我需要的提示......問題在於我的彈出窗口不在「內容」div內。謝謝! – ml123