私は JQueryMobile を初めて使用します... このサンプル コードを取得して、JQueryMobile を使用して開いているポップアップ内から別のポップアップを開こうとしていますが、失敗しています。最初のリンクは機能しますが、ポップアップ内のリンクは機能しません。また、これを行うべきより良い方法についての提案も受け付けています。
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="jquery/mobile/jquery.mobile-1.4.2.css" />
<script type="text/javascript" src="jquery/jquery-2.0.3.js" ></script>
<script type="text/javascript" src="jquery/mobile/jquery.mobile-1.4.2.js" ></script>
<style>
html, body { padding: 0; margin: 0; }
html, .ui-mobile, .ui-mobile body {
height: 585px;
}
.ui-mobile, .ui-mobile .ui-page {
min-height: 585px;
}
</style>
</head>
<body>
<div data-role="page" style="max-height:590px; min-height:590px;">
<a href="#mainMenu" data-rel="popup" data-role="button" data-inline="true" data-transition="pop">main menu</a>
<div data-role="popup" id="mainMenu" data-overlay-theme="a" data-theme="a" 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 role="main" 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="#settingsMenu" data-rel="popup" data-position-to="window" data-role="button" data-inline="true" data-transition="pop">settings</a>
<div data-role="popup" id="settingsMenu" data-overlay-theme="a" data-theme="a" 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 role="main" 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="a">Cancel</a>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-transition="flow" data-theme="b">Delete</a>
</div>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-theme="a">Cancel</a>
<a href="#" data-role="button" data-inline="true" data-rel="back" data-transition="flow" data-theme="b">Delete</a>
</div>
</div>
</div>
</body>
</html>
更新:わかりました、私は重複した質問の解決策が好きではありません.JQueryMobileでこれを実行して同様のことを行う別の方法はありますか?おそらくページを使用してポップアップとしてテーマを設定するだけですか?