@@ -27,7 +27,6 @@ var WidgetCustomizer = (function ($) {
2727 control . container . removeClass ( 'previewer-loading' ) ;
2828 } ) ;
2929
30-
3130 control . setupControlToggle ( ) ;
3231
3332 control . setupWidgetTitle ( ) ;
@@ -120,34 +119,35 @@ var WidgetCustomizer = (function ($) {
120119 editingEffects : function ( ) {
121120 var control = this ;
122121 var widgetId ;
123-
124- /*On control hover*/
125- $ ( control . container ) . hover ( function ( ) {
126- var toRemove = 'customize-control-widget_' ;
127- widgetId = '#' + $ ( this ) . attr ( 'id' ) . replace ( toRemove , '' ) ;
128-
129- $ ( 'iframe' ) . contents ( ) . find ( widgetId ) . css ( {
130- 'border-radius' : '2px' ,
131- 'outline' : 'none' ,
132- 'box-shadow' : '0 0 3px #CE0000'
133- } ) ;
134-
135- } ,
136- function ( ) {
137- $ ( 'iframe' ) . contents ( ) . find ( widgetId ) . css ( { 'box-shadow' : 'none' } ) ;
138- } ) ;
139-
140- /*On control input click*/
122+
123+ /* On control hover */
124+ $ ( control . container ) . hover (
125+ function ( ) {
126+ var toRemove = 'customize-control-widget_' ;
127+ widgetId = '#' + $ ( this ) . attr ( 'id' ) . replace ( toRemove , '' ) ;
128+
129+ $ ( 'iframe' ) . contents ( ) . find ( widgetId ) . css ( {
130+ 'border-radius' : '2px' ,
131+ 'outline' : 'none' ,
132+ 'box-shadow' : '0 0 3px #CE0000'
133+ } ) ;
134+ } ,
135+ function ( ) {
136+ $ ( 'iframe' ) . contents ( ) . find ( widgetId ) . css ( { 'box-shadow' : 'none' } ) ;
137+ }
138+ ) ;
139+
140+ /* On control input click */
141141 $ ( control . container ) . find ( 'input' ) . click ( function ( ) {
142- var toRemove = 'customize-control-widget_' ;
143- widgetId = '#' + $ ( this ) . closest ( control . container ) . attr ( 'id' ) . replace ( toRemove , '' ) ;
144-
145- $ ( 'iframe' ) . contents ( ) . find ( 'body, html' ) . animate ( {
142+ var toRemove = 'customize-control-widget_' ;
143+ widgetId = '#' + $ ( this ) . closest ( control . container ) . attr ( 'id' ) . replace ( toRemove , '' ) ;
144+
145+ $ ( 'iframe' ) . contents ( ) . find ( 'body, html' ) . animate ( {
146146 scrollTop : $ ( 'iframe' ) . contents ( ) . find ( widgetId ) . offset ( ) . top - 20
147147 } , 1000 ) ;
148-
148+
149149 } ) ;
150- }
150+ }
151151 } ) ;
152152
153153 // Note that 'widget_form' must match the Widget_Form_WP_Customize_Control::$type
0 commit comments