Modal onComplete isn't fired on jQuery closeModal
Hi there,
I'm currently initiating some modals with code like this:
$('#dynamicModal').openModal({ complete: function() { onRequestHide(); }}); // Callback for Modal open});
It works great if a user clicks outside of the modal to close it, however if a modal is closed my jQuery like this:
$('#dynamicModal').closeModal();
The onComplete callback doesn't it fired. Is there any way we could bake this into the closeModal method? It's useful for me and my users to close a modal (especially if it's a dynamic one) via buttons with a jQuery call.
Thanks, Evan
Initialize your modal with leanModal. openModal and closeModal are methods without options
leanModal initialization with options depends on a trigger button. How do you set options on a modal that is only opened programmatically? in other words no trigger
I am having this same problem and need a solution. I know openModal takes LeanModalOptions because I successfully pass in a LeanModalOptions object that sets the modal options correctly. The modal is both opened and closed programmatically rather than via user input. Here's the weird thing: a ready function fires, but my complete function does not. It's driving me crazy!