jQuery dialog内に動的ページを読み込みたいのですが、
とあるサイトを参考に以下のコードで何も起らないのですが?
イメージとしては id="frameWindow"にtestと表示されると思うのですが
何が駄目なのかわかりません。よろしくお願い致します。
</head> <body> <div data-role="page" id="search" data-theme="c"> <div data-role="header"> <h1>search</h1> </div> <div data-role="content"><meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css" /> <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js"></script>
<button id="btn">登録</button>
<div id="frameWindow" style="display: none;"></div></div></div> <div data-role="footer"> <h4><small>Copyright © 2011 AI All Rights Reserved.</small></h4> </div>
$("#btn").click(function() {
$('#frameWindow').dialog('open');
});
$("#frameWindow").dialog({
autoOpen: false,
width: 500,
height: 500,
modal: true,
open : function(){
$("#frameWindow").append('<iframe id="iframeDiv"></iframe>');
$("#iframeDiv").attr({
src : "test.php?no=1",
width : '400px',
height : '400px'
});
},
close : function(){
$("#iframeDiv").remove();
}
});
あなたの回答
tips
プレビュー