Can you create nested popups with JQueryMobile

纵然是瞬间 提交于 2019-12-02 04:13:57

You can open a popup within a popup is possible is Jquery mobile. Check the below one to get popup within a popup.

 <a href="#expensePopup" data-rel="popup" data-role="button" data-inline="true" id="addExpenses1">Open poup 1</a>

<div data-role="popup" id="expensePopup"  data-dismissible="false"> <a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-left">Close</a>
<div>  <div data-role="header">
    <h3>popup1</h3>
  </div>
              <a href="#pagetwo" data-rel="popup" data-role="button" data-icon="plus"  id="deleteExpenses1">Open popup 2</a>

</div>
<div   id="pagetwo" data-role="popup">
    <a data-role="button" data-theme="a" data-icon="delete"  class="ui-btn-left"  data-iconpos="notext" onclick="closePopup();"></a>
  <div data-role="header">
    <h3>I'm A popup2!</h3>
  </div>

  <div data-role="main" class="ui-content">
    <p>The dialog box is different from a normal page.</p>
  </div>


</div> 
    <div>
function closePopup(){
 $("#pagetwo").popup("close");
 $("#expensePopup").popup("open");
}

See this fiddle Demo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!