如何运行模态并通过动态创建元素来构建模态。
例如,我有一个要启动模式的按钮,该模式是动态创建的。
我正在使用此模式插件: http : //labs.voronianski.com/jquery.avgrund.js/
我已经尝试过了,虽然它在第二次单击按钮后才起作用,但它确实起作用。
$('body').on('click','#siteSwitch', function(){
$(this).boxModal({
height: 800,
width: 800,
holderClass: 'boxModal',
showClose: true,
showCloseText: 'X',
enableStackAnimation: false,
template: '<p>So implement your design and place content here! If you want to close modal, please hit "Esc", click somewhere on the screen or use special button.</p>'
});
});
谢谢