我有一个 div,其内容要显示为弹出窗口,但是,我不确定如何使用 magnific popup 脚本自动在弹出窗口中打开它,就像警报一样。
$(function () {
$('.popup-modal').magnificPopup({
type: 'inline',
focus: '#zipCode',
modal: true
});
});
当我使用单击事件触发具有“popup-modal”类的 div 时,我看到屏幕为灰色,其值呈现为 true。