Magnific Popup action before close
问题 I have implemented Magnific Popup in my solutions and I am using Bootbox to get confirmation from the user that he wants to close the window without saving changes, etc. I hooked up my custom function to close callback but it doesn't work as expected. $('#divThumbnails').magnificPopup({ delegate: 'a', type: 'inline', midClick: true, callbacks: { close: function () { var confirm = bootbox.confirm('Are you sure?', function(result) { }); if (confirm) return true; else return false; } } }); This