]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-content/themes/twentyseventeen/assets/js/customize-controls.js
WordPress 4.7.1
[autoinstalls/wordpress.git] / wp-content / themes / twentyseventeen / assets / js / customize-controls.js
index b8e7e8160c7e8b2be03791e57d067fe365148ccf..e6f6037a4dbfe9bf714af76964526dd3c0bfb599 100644 (file)
                });
 
                // Detect when the front page sections section is expanded (or closed) so we can adjust the preview accordingly.
-               wp.customize.section( 'theme_options' ).expanded.bind( function( isExpanding ) {
+               wp.customize.section( 'theme_options', function( section ) {
+                       section.expanded.bind( function( isExpanding ) {
 
-                       // Value of isExpanding will = true if you're entering the section, false if you're leaving it.
-                       wp.customize.previewer.send( 'section-highlight', { expanded: isExpanding });
-               });
+                               // Value of isExpanding will = true if you're entering the section, false if you're leaving it.
+                               wp.customize.previewer.send( 'section-highlight', { expanded: isExpanding });
+                       } );
+               } );
        });
 })( jQuery );