Changeset 20930
- Timestamp:
- 05/26/2012 07:02:28 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/js/customize-preview.dev.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/js/customize-preview.dev.js
r20919 r20930 82 82 83 83 api.when.apply( api, bg ).done( function( color, image, position_x, repeat, attachment ) { 84 var body = $(document.body), 84 var body = $(document.body), 85 head = $('head'), 85 86 style = $('#custom-background-css'), 86 87 update; … … 90 91 if ( body.hasClass('custom-background') && ! style.length ) 91 92 return; 92 93 // Create the CSS container if it doesn't already exist.94 if ( ! style.length )95 style = $('<style type="text/css" id="custom-background-css" />').appendTo('head');96 93 97 94 update = function() { … … 114 111 } 115 112 116 style.html( 'body.custom-background { ' + css + ' }' ); 113 // Refresh the stylesheet by removing and recreating it. 114 style.remove(); 115 style = $('<style type="text/css" id="custom-background-css">body.custom-background { ' + css + ' }</style>').appendTo( head ); 117 116 }; 118 117
Note: See TracChangeset
for help on using the changeset viewer.