diff --git a/jquery.the-modal.js b/jquery.the-modal.js index f199a0a..f572ebc 100644 --- a/jquery.the-modal.js +++ b/jquery.the-modal.js @@ -135,7 +135,7 @@ // close modal if opened if($('.'+localOptions.overlayClass).length) { - context.close(); + $.modal().close(); } lockContainer(localOptions);