我正在嘗試使用jQuery Mobile中的一些提醒進行全局popover。那可能嗎?它似乎像彈出窗口必須在jQuery的移動頁面才能被訪問。我假設這是因爲該頁面以外的所有內容都不可見。頁面之外的JQuery Mobile Popover
下面是我正在談論的一個例子。我如何獲得第二個版本的工作?
作品
<div data-role="page" data-theme="a">
<div data-role="content">
<a href="#alert-popup" data-rel="popup" data-role="button" data-inline="true">Popup with close button right</a>
<div data-role="popup" id="alert-popup" data-theme="c">
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
<h1>Alert Title</h1>
<p>
Freegan thundercats raw denim adipisicing elit. 8-bit hella lomo do irony, sartorial aliquip wes anderson. Elit quinoa consectetur hoodie, bushwick 3 wolf moon godard eiusmod next level quis echo park. Keytar ullamco exercitation salvia, brunch before they sold out cray minim echo park polaroid vegan cliche reprehenderit vero synth. Artisan VHS fanny pack aliqua ex williamsburg duis. Reprehenderit chillwave skateboard post-ironic, food truck ethical est wes anderson letterpress incididunt master cleanse. Selvage farm-to-table elit vinyl jean shorts, consectetur delectus non banksy.
</p>
</div>
</div>
</div>
不工作
<div data-role="page" data-theme="a">
<div data-role="content">
<a href="#alert-popup" data-rel="popup" data-role="button" data-inline="true">Popup with close button right</a>
</div>
</div>
<div data-role="popup" id="alert-popup" data-theme="c">
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
<h1>Alert Title</h1>
<p>
Freegan thundercats raw denim adipisicing elit. 8-bit hella lomo do irony, sartorial aliquip wes anderson. Elit quinoa consectetur hoodie, bushwick 3 wolf moon godard eiusmod next level quis echo park. Keytar ullamco exercitation salvia, brunch before they sold out cray minim echo park polaroid vegan cliche reprehenderit vero synth. Artisan VHS fanny pack aliqua ex williamsburg duis. Reprehenderit chillwave skateboard post-ironic, food truck ethical est wes anderson letterpress incididunt master cleanse. Selvage farm-to-table elit vinyl jean shorts, consectetur delectus non banksy.
</p>
</div>
沒辦法解決嗎? – smokingoyster
如果你可以解釋一下你想要的東西,那麼我可以試着幫你想一些選擇,但據我所知,閱讀文檔時,div必須在同一頁面內。 – Chase
我試圖在每個頁面的底部模板中都有一個共同的彈出窗口,以便它們都可以訪問它。我現在用一個調整好的關閉按鈕來實現這個功能。 – smokingoyster