This repository has been archived on 2022-08-01. You can view files and clone it, but cannot push or open issues or pull requests.
Oldphaloskepsis/plugins/jetpack/modules/theme-tools/site-logo/js/site-logo-header-text.js

24 lines
520 B
JavaScript
Raw Permalink Normal View History

2017-01-12 23:10:07 +00:00
/* 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);