File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ You can submit the options object like:
3535 prepend: null ,
3636 manuallyCopyFormValues: true ,
3737 deferred: $ .Deferred (),
38- timeout: 250
38+ timeout: 250 ,
39+ title: null
3940 });
4041` ` `
4142
@@ -95,6 +96,11 @@ Currently this plugin supports the following options:
9596 - Acceptable-Values: Time in Milliseconds for ` setTimeout`
9697 - Function: To change the amount of time to wait for the content, etc to load before printing the element from the new window/iframe created
9798
99+ ####title
100+
101+ - Default: ` null ` , uses the host page title
102+ - Acceptable-Values: Any single-line string
103+ - Function: To change the printed title
98104
99105## Tested with
100106
Original file line number Diff line number Diff line change 100100 prepend : null ,
101101 manuallyCopyFormValues : true ,
102102 deferred : $ . Deferred ( ) ,
103- timeout : 250
103+ timeout : 250 ,
104+ title : null
104105 } ;
105106 // Merge with user-options
106107 options = $ . extend ( { } , defaults , ( options || { } ) ) ;
126127 . remove ( ) ;
127128 // Add in the styles
128129 copy . append ( $styles . clone ( ) ) ;
130+ // Update title
131+ if ( options . title ) {
132+ var title = $ ( "title" , copy ) ;
133+ if ( title . length === 0 ) {
134+ title = $ ( "<title />" ) ;
135+ copy . append ( title ) ;
136+ }
137+ title . text ( options . title ) ;
138+ }
129139 // Appedned content
130140 copy . append ( getjQueryObject ( options . append ) ) ;
131141 // Prepended content
You can’t perform that action at this time.
0 commit comments