<script>
$(document).ready(function () {
setInterval(function () {
$.magnificPopup.open({
items: {
src: '#test-popup'
},
type: 'inline'
});
}, <?php echo $time_popup; ?>);
});
</script>
This is my script. I try to reset set interval function, when click close to popup. I use magnific popup, try with this, without result.
You have to assign your
setInterval
call to a variable to be able to reset it withclearInterval
.From the docs you shared: