diff --git a/js/modal.js b/js/modal.js index c757ef2..9bf8cb1 100644 --- a/js/modal.js +++ b/js/modal.js @@ -558,7 +558,7 @@ // Bind a click for closing the modalContent modalContentClose = function(){close(); return false;}; - $('.close').bind('click', modalContentClose); + $('#modalContent .modal-header .close').bind('click', modalContentClose); // Bind a keypress on escape for closing the modalContent modalEventEscapeCloseHandler = function(event) { @@ -574,7 +574,7 @@ // close button, but we should save the original focus to restore it after // the dialog is closed. var oldFocus = document.activeElement; - $('.close').focus(); + $('#modalContent .modal-header .close').focus(); // Close the open modal content and backdrop function close() { @@ -583,7 +583,7 @@ $('body').unbind( 'focus', modalEventHandler); $('body').unbind( 'keypress', modalEventHandler ); $('body').unbind( 'keydown', modalTabTrapHandler ); - $('.close').unbind('click', modalContentClose); + $('#modalContent .modal-header .close').unbind('click', modalContentClose); $('body').unbind('keypress', modalEventEscapeCloseHandler); $(document).trigger('CToolsDetachBehaviors', $('#modalContent')); @@ -659,7 +659,7 @@ $('body').unbind('focus', modalEventHandler); $('body').unbind('keypress', modalEventHandler); $('body').unbind( 'keydown', modalTabTrapHandler ); - $('.close').unbind('click', modalContentClose); + $('#modalContent .modal-header .close').unbind('click', modalContentClose); $('body').unbind('keypress', modalEventEscapeCloseHandler); $(document).trigger('CToolsDetachBehaviors', $('#modalContent'));