From e5a7af36d5a67bb4c3dfa5cc3e9924c3c901d0d3 Mon Sep 17 00:00:00 2001 From: Jacob Thornton Date: Sun, 28 Jul 2013 22:14:43 -0700 Subject: fixes #8703 --- js/modal.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'js') diff --git a/js/modal.js b/js/modal.js index 83095e8ff..d53cc9eaf 100644 --- a/js/modal.js +++ b/js/modal.js @@ -234,8 +234,10 @@ }) }) - var $body = $(document.body) - .on('shown.bs.modal', '.modal', function () { $body.addClass('modal-open') }) - .on('hidden.bs.modal', '.modal', function () { $body.removeClass('modal-open') }) + $(function () { + var $body = $(document.body) + .on('shown.bs.modal', '.modal', function () { $body.addClass('modal-open') }) + .on('hidden.bs.modal', '.modal', function () { $body.removeClass('modal-open') }) + }) }(window.jQuery); -- cgit v1.2.3