I loaded custom js in head section of grid ui component in order to open a model dialog box when i click a button.
require([
"jquery",
'Magento_Ui/js/modal/modal'
], function($, modal){
var options = {
type: 'popup',
responsive: true,
innerScroll: true,
title: 'Title',
buttons: [{
text: $.mage.__('Proceed'),
class: '',
click: function () {
/* some stuff */
this.closeModal();
}
}]
};
var popup = modal(options,$('#popup-modal'));
$("#print").click(function(){
....
....}});
Its throw an following error when page load
jquery.js:3762 Uncaught TypeError: Cannot read property 'nodeName' of undefined
can any one suggest please.
Thanks.