这是我的大胆弹出
<script>
$(document).ready(function () {
setInterval(function () {
$.magnificPopup.open({
items: {
src: '#recently-viewed-popup'
},
type: 'inline'
});
}, <?php echo $time_popup; ?>);
});
</script>
我抓住了,但是当客户关闭它时如何抓住它?
试试这个:
<script>
$(document).ready(function () {
setInterval(function () {
$.magnificPopup.open({
items: {
src: '#recently-viewed-popup'
},
type: 'inline'
});
}, <?php echo $time_popup; ?>);
});
$.magnificPopup.close({
alert(55);
})
</script>
但没有效果。
答案 0 :(得分:0)
在这里,您可以看到示例,当您关闭时,会出现 33 警告:
<script>
$(document).ready(function () {
setInterval(function () {
$.magnificPopup.open({
items: {
src: '#recently-viewed-popup'
},
type: 'inline',
callbacks: {
close: function testt(){
alert(33);
}
}
});
}, <?php echo $time_popup; ?>);
});
</script>