diff --git a/src/definitions/modules/modal.js b/src/definitions/modules/modal.js index 206ec0742..5dae5bbd9 100644 --- a/src/definitions/modules/modal.js +++ b/src/definitions/modules/modal.js @@ -80,7 +80,6 @@ $.fn.modal = function(parameters) { module.create.dimmer(); module.refreshModals(); - module.verbose('Attaching close events', $close); module.bind.events(); module.observeChanges(); module.instantiate(); @@ -189,8 +188,13 @@ $.fn.modal = function(parameters) { bind: { events: function() { - $close.on('click' + eventNamespace, module.event.close); - $window.on('resize' + elementNamespace, module.event.resize); + module.verbose('Attaching events'); + $module + .on('click' + eventNamespace, selector.close, module.event.close) + ; + $window + .on('resize' + elementNamespace, module.event.resize) + ; } },