Dialog 基本示例。
var Dialog = FNX.include('popup/dialog');
var example1 = new Dialog({
content: '<div style="background:red;">内容可传入 html 标签</div>'
});
$('#example1').click(function () {
example1.show();
});
var Dialog = FNX.include('popup/dialog');
var example2 = new Dialog({
content: 'iframe:./iframe.html'
});
$('#example2').click(function () {
example2.show();
});
var Dialog = FNX.include('popup/dialog');
var example3 = new Dialog({
height: 400
});
$('#example3 button').click(function () {
example3.set('content', $(this).attr('data-src'));
example3.show();
});
ajax-page 的内容如下:
<div>我是ajax页面的内容</div>
<div>我是ajax页面的内容</div>
var Dialog = FNX.include('popup/dialog');
var example4 = new Dialog({
content: 'ajax:./ajax-page.html'
});
$('#example4').click(function () {
example4.show();
});