是否可以在jquery mobile的popup(parent)中打开弹出窗口? [英] Is it possible to open popup in popup(parent) in jquery mobile?

查看:119
本文介绍了是否可以在jquery mobile的popup(parent)中打开弹出窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Jquery mobile 1.4.2. 是否可以在popup(父级popup)中打开popup(子级popup)?

I am using Jquery mobile 1.4.2. Is it possible to open popup(child popup) in popup(parent popup) ?

我尝试过这种方式,

<a href="#pop1" data-rel="popup" data-position-to="window" data-transition="pop">pop1</a> 

<div data-role="popup" id="pop1" data-dismissible="false"> 
 Parent popup
 <a href="#pop2" data-rel="popup" data-position-to="window" data-transition="pop">popup 2</a> 
 <div data-role="popup" id="pop2" data-dismissible="false"> 
   Child Popup
 </div>

</div>

但是这不起作用..有什么办法可以解决这个问题?

But this does not working.. Is there any way to solve this problem ?

推荐答案

如果您查看弹出式api文档: http://api.jquerymobile.com/popup/,其中指出以下内容:

If you look at the popup api docs : http://api.jquerymobile.com/popup/, it states the following:

该框架当前不支持弹出窗口的链接,因此无法嵌入从一个弹出窗口到另一个弹出窗口的链接.弹出窗口中所有带有data-rel ="popup"的链接将根本不起作用.

The framework does not currently support chaining of popups so it's not possible to embed a link from one popup to another popup. All links with a data-rel="popup" inside a popup will not do anything at all.

如果需要在另一个弹出窗口上打开一个弹出窗口,则必须使用其他插件或自己滚动.您可以看到我对另一个问题的回答

If you need to have one popup open on top of another you will have to use a different plugin or roll your own. You can see my answer to another question Show raw jquery mobile simple dialog above another raw jquery mobile simple dialog where I used the Simpledialog2 plugin to achieve this.

这篇关于是否可以在jquery mobile的popup(parent)中打开弹出窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆