~canonical-sysadmins/wordpress/5.1

« back to all changes in this revision

Viewing changes to wp-content/themes/twentyfourteen/js/customizer.js

  • Committer: Haw Loeung
  • Date: 2016-12-13 06:54:17 UTC
  • mto: This revision was merged to the branch mainline in revision 24.
  • Revision ID: haw.loeung@canonical.com-20161213065417-pemlo49o7in8nmkn
New upstream version 4.7.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * Twenty Fourteen Customizer enhancements for a better user experience.
3
 
 *
4
 
 * Contains handlers to make Customizer preview reload changes asynchronously.
5
 
 */
6
 
( function( $ ) {
7
 
        // Site title and description.
8
 
        wp.customize( 'blogname', function( value ) {
9
 
                value.bind( function( to ) {
10
 
                        $( '.site-title a' ).text( to );
11
 
                } );
12
 
        } );
13
 
        wp.customize( 'blogdescription', function( value ) {
14
 
                value.bind( function( to ) {
15
 
                        $( '.site-description' ).text( to );
16
 
                } );
17
 
        } );
18
 
        // Header text color.
19
 
        wp.customize( 'header_textcolor', function( value ) {
20
 
                value.bind( function( to ) {
21
 
                        if ( 'blank' === to ) {
22
 
                                $( '.site-title, .site-description' ).css( {
23
 
                                        'clip': 'rect(1px, 1px, 1px, 1px)',
24
 
                                        'position': 'absolute'
25
 
                                } );
26
 
                        } else {
27
 
                                $( '.site-title,  .site-description' ).css( {
28
 
                                        'clip': 'auto',
29
 
                                        'position': 'static'
30
 
                                } );
31
 
 
32
 
                                $( '.site-title a' ).css( {
33
 
                                        'color': to
34
 
                                } );
35
 
                        }
36
 
                } );
37
 
        } );
38
 
} )( jQuery );
 
 
b'\\ No newline at end of file'