Ticket #21685: 21685-customizer.diff
| File 21685-customizer.diff, 1009 bytes (added by obenland, 9 months ago) |
|---|
-
wp-content/themes/twentytwelve/js/theme-customizer.js
33 33 34 34 // Hook into background color change and adjust body class value as needed. 35 35 wp.customize( 'background_color', function( value ) { 36 var body = $( 'body' );37 36 value.bind( function( to ) { 38 37 if ( '#ffffff' == to || '#fff' == to || '' == to ) 39 body.addClass( 'custom-background-white' );38 $( 'body' ).addClass( 'custom-background-white' ); 40 39 else if ( '' == to ) 41 body.addClass( 'custom-background-empty' );40 $( 'body' ).addClass( 'custom-background-empty' ); 42 41 else 43 body.removeClass( 'custom-background-empty custom-background-white' );42 $( 'body' ).removeClass( 'custom-background-empty custom-background-white' ); 44 43 } ); 45 44 } ); 46 45 } )( jQuery ); 46 No newline at end of file
