mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-26 02:57:45 +01:00
9f5310274b
git-svn-id: http://core.svn.wordpress.org/trunk@21343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
14 lines
490 B
JavaScript
14 lines
490 B
JavaScript
( function( $ ){
|
|
// Hook into background color change and adjust body class value as needed.
|
|
wp.customize( 'background_color', function( value ) {
|
|
var body = $( 'body' );
|
|
value.bind( function( to ) {
|
|
if ( '#ffffff' == to || '#fff' == to || '' == to )
|
|
body.addClass( 'custom-background-white' );
|
|
else if ( '' == to )
|
|
body.addClass( 'custom-background-empty' );
|
|
else
|
|
body.removeClass( 'custom-background-empty custom-background-white' );
|
|
} );
|
|
} );
|
|
} )( jQuery ); |