Browse Source

Fixes #2042 bind events with delegation in general

pull/2053/head
jlukic 9 years ago
parent
commit
d08337134c
1 changed files with 7 additions and 3 deletions
  1. 10
      src/definitions/modules/modal.js

10
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)
;
}
},

Loading…
Cancel
Save