@@ -268,6 +268,27 @@ function jBox(type, options) {
268
268
} ;
269
269
270
270
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
+
271
292
// Create jBox
272
293
273
294
this . _create = function ( )
@@ -551,27 +572,6 @@ function jBox(type, options) {
551
572
} ;
552
573
553
574
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
-
575
575
// Generate CSS for animations and append to header
576
576
577
577
this . _generateAnimationCSS = function ( )
0 commit comments