From 2d111e1c3777a6fa09d5038c2f81c46f7264e880 Mon Sep 17 00:00:00 2001 From: koopersmith Date: Sat, 26 May 2012 07:02:28 +0000 Subject: [PATCH] Theme Customizer: Fix preview background CSS creation to insert/remove style nodes (for IE8 compatibility). fixes #20582, see #19910. git-svn-id: http://core.svn.wordpress.org/trunk@20930 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/js/customize-preview.dev.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/wp-includes/js/customize-preview.dev.js b/wp-includes/js/customize-preview.dev.js index 36c4a6a858..1aef6aa232 100644 --- a/wp-includes/js/customize-preview.dev.js +++ b/wp-includes/js/customize-preview.dev.js @@ -81,7 +81,8 @@ }); api.when.apply( api, bg ).done( function( color, image, position_x, repeat, attachment ) { - var body = $(document.body), + var body = $(document.body), + head = $('head'), style = $('#custom-background-css'), update; @@ -90,10 +91,6 @@ if ( body.hasClass('custom-background') && ! style.length ) return; - // Create the CSS container if it doesn't already exist. - if ( ! style.length ) - style = $('').appendTo( head ); }; $.each( arguments, function() {