Skip to content

Commit

Permalink
Bug fix effects and closes #161
Browse files Browse the repository at this point in the history
  • Loading branch information
dixso committed Dec 3, 2015
1 parent fcb3195 commit 0dc312a
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/js/custombox.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,20 +424,14 @@
};

if ( _this.cb[_this.item].settings.loading ) {
setTimeout(function() {
open();
}, delay);
setTimeout(open, delay);
} else {
if ( _config.overlay.together.indexOf( cb.settings.overlayEffect ) > -1 || _config.oldIE ) {
if ( _this.cb[_this.item].settings.loading ) {
setTimeout(function() {
// Load target.
_this.load();

if ( cb.inline) {
cb.wrapper.classList.add('custombox-modal-open');
}
}, delay);
// Load target.
_this.load();

if ( cb.inline) {
cb.wrapper.classList.add('custombox-modal-open');
}
} else {
cb.overlay.addEventListener('transitionend', open, false);
Expand Down

0 comments on commit 0dc312a

Please sign in to comment.