- 정보공유
[JQUERY] magnificPopup 조건이 맞지 않으면 popup 띄우지 않기.
$(function(){
$('.iframe-win').magnificPopup({
type:'iframe',
callbacks: {
beforeOpen: function(data) {
;
},
elementParse: function(item) {
// Function will fire for each target element
// "item.el" is a target DOM element (if present)
// "item.src" is a source that you may modify
},
change: function() {
; // Direct reference to your popup element
},
},
disableOn: function() {
let blockOpen = false;
if (!frm.input.value) {
alert("입력해주세요.");
blockOpen = true;
}
if (blockOpen == true) {
return false;
}
else {
return true;
}
}
});
});
disableOn 옵션을 사용.