Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions jquery.modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
}
}(function($, window, document, undefined) {

// Prevent duplicate plugin initialization when the script is imported more than once.
if ($.modal && $.modal.close && $.fn.modal) {
return;
}

var modals = [],
getCurrent = function() {
return modals.length ? modals[modals.length - 1] : null;
Expand Down