Skip to content

Commit 5766b57

Browse files
committed
Bugfix
1 parent acf5a39 commit 5766b57

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

Source/jBox.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
}
236236

237237
.jBox-pointerPosition-top.jBox-closeButton-box:before {
238-
top: 4px;
238+
top: 5px;
239239
}
240240

241241
.jBox-pointerPosition-right.jBox-closeButton-box:before {

Source/jBox.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,27 @@ function jBox(type, options) {
268268
};
269269

270270

271+
// Set the title width to content width
272+
273+
this._setTitleWidth = function ()
274+
{
275+
// Abort if there is no title
276+
if (!this.titleContainer) return null;
277+
278+
// Expose wrapper to get actual width
279+
if (this.wrapper.css('display') == 'none') {
280+
this.wrapper.css('display', 'block');
281+
var contentWidth = this.content.outerWidth();
282+
this.wrapper.css('display', 'none');
283+
} else {
284+
var contentWidth = this.content.outerWidth();
285+
}
286+
287+
// Set max-width only
288+
this.titleContainer.css({maxWidth: (contentWidth || null)});
289+
}
290+
291+
271292
// Create jBox
272293

273294
this._create = function ()
@@ -551,27 +572,6 @@ function jBox(type, options) {
551572
};
552573

553574

554-
// Set the title width to content width
555-
556-
this._setTitleWidth = function ()
557-
{
558-
// Abort if there is no title
559-
if (!this.titleContainer) return null;
560-
561-
// Expose wrapper to get actual width
562-
if (this.wrapper.css('display') == 'none') {
563-
this.wrapper.css('display', 'block');
564-
var contentWidth = this.content.outerWidth();
565-
this.wrapper.css('display', 'none');
566-
} else {
567-
var contentWidth = this.content.outerWidth();
568-
}
569-
570-
// Set max-width only
571-
this.titleContainer.css({maxWidth: (contentWidth || null)});
572-
}
573-
574-
575575
// Generate CSS for animations and append to header
576576

577577
this._generateAnimationCSS = function ()

0 commit comments

Comments
 (0)