gpt4 book ai didi

javascript - 页面外的 JQuery Mobile Popover

转载 作者:行者123 更新时间:2023-11-28 09:38:19 29 4
gpt4 key购买 nike

我正在尝试在 jQuery Mobile 中创建一个全局弹出窗口,其中包含一些警报。那可能吗?似乎弹出窗口必须位于 jquery 移动页面中才能访问。我假设这是因为该页面之外的所有内容都不可见。

这是我正在谈论的一个例子。如何让第二个版本正常工作?

作品

<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>

最佳答案

您是对的,请参阅here :

A popup div has to be nested inside the same page as the link.

<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 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>

<强> EXAMPLE

关于javascript - 页面外的 JQuery Mobile Popover,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12713505/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com