From 2997f7ad65d5e86930f13d9b0eaaab5da7fb0f3d Mon Sep 17 00:00:00 2001 From: xyanide Date: Wed, 30 Oct 2013 14:46:36 +0100 Subject: [PATCH] Added a $.modal.isActive function to detect if a modal is currently open --- jquery.modal.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jquery.modal.js b/jquery.modal.js index b1ab29a..9b98356 100644 --- a/jquery.modal.js +++ b/jquery.modal.js @@ -175,6 +175,11 @@ if (!current) return; current.resize(); }; + + // Returns if there currently is an active modal + $.modal.isActive = function () { + return current ? true : false; + } $.modal.defaults = { overlay: "#000",