I want to show phtml file inside popup on click of a button but it shows by default open how to resolve it anyone has an idea ?? I want to open when I click on button
<div>
<a href="#" id="click-me">Notify Me</a>
</div>
<div id="popup-mpdal">
<?php include ($block->getTemplateFile(Vendor_Module::notifyoutofstcoks.phtml')) ?>
</div>
<script>
require(
[
'jquery',
'Magento_Ui/js/modal/modal'
],
function(
$,
modal
) {
var options = {
type: 'popup',
responsive: true,
innerScroll: true,
buttons: [{
text: $.mage.__('Continue'),
class: '',
click: function () {
this.closeModal();
}
}]
};
var popup = modal(options, $('#popup-mpdal'));
$("#click-me").on('click',function(){
$("#popup-mpdal").modal("openModal");
});
}
);
</script>