親jsファイルからfancybox popupを呼び出す方法を教えてください。ボタンをクリックすると、関数で条件が真の場合、1 つの関数になります。fancybox ポップアップを開く必要があります。よろしくお願いします..
$(document).ready(function() {
$("#EXTERNAL").fancybox({
'width' : '80%',
'height' : '100%',
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'href' : 'openpopup.html',
'type' : 'iframe'
});
});
function clickFancy(){
if(true){
// here i need open fancypopup
}else(){
}
<body>
<form name="frm1">
<input type="submit" name="fancy" onclick="clickFancy()">
<button>Click me</button>
</form>
</body>
<html>