diff options
Diffstat (limited to 'plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-header-text.js')
-rw-r--r-- | plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-header-text.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-header-text.js b/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-header-text.js new file mode 100644 index 00000000..82673a7e --- /dev/null +++ b/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-header-text.js @@ -0,0 +1,24 @@ +/* global site_logo_header_classes */ +/** + * JS for handling the "Display Header Text" setting's realtime preview. + */ +( function( $ ) { + var api = wp.customize, + $classes = site_logo_header_classes; + + api( 'site_logo_header_text', function( value ) { + value.bind( function( to ) { + if ( true === to ) { + $( $classes ).css( { + position: 'static', + clip: 'auto', + } ); + } else { + $( $classes ).css( { + position: 'absolute', + clip: 'rect(1px 1px 1px 1px)', + } ); + } + } ); + } ); +} )( jQuery ); |