diff --git a/src/overlay.js b/src/overlay.js index 61f5fa88..eac53c3d 100644 --- a/src/overlay.js +++ b/src/overlay.js @@ -132,11 +132,8 @@ this.element = options.element; this.elementWrapper.appendChild(this.element); - if (this.element.id) { - this.elementWrapper.id = "overlay-wrapper-" + this.element.id; - } else { - this.elementWrapper.id = "overlay-wrapper"; - } + this.elementWrapper.id = "overlay-wrapper" + (this.element.id ? "-" + this.element.id : ""); + this.style = this.elementWrapper.style; this._init(options);