Skip to content

Commit

Permalink
Merge pull request #215 from jaguadoromero/fix_issue_#186
Browse files Browse the repository at this point in the history
Avoid having to set inline styles to hide modal by default. Fix #186
  • Loading branch information
kylefox committed Oct 18, 2017
2 parents 23074d7 + 48b20e4 commit 6b835ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jquery.modal.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
background-color: transparent;
}
.modal {
display: inline-block;
display: none;
vertical-align: middle;
position: relative;
z-index: 2;
Expand Down
4 changes: 2 additions & 2 deletions jquery.modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@
}
this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker);
if(this.options.doFade) {
this.$elm.css('opacity',0).show().animate({opacity: 1}, this.options.fadeDuration);
this.$elm.css({opacity: 0, display: 'inline-block'}).animate({opacity: 1}, this.options.fadeDuration);
} else {
this.$elm.show();
this.$elm.css('display', 'inline-block');
}
this.$elm.trigger($.modal.OPEN, [this._ctx()]);
},
Expand Down

1 comment on commit 6b835ec

@jserrao
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

Please sign in to comment.