Skip to content

Commit

Permalink
Ensure correct Widget Context state in the customizer
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd committed Jun 13, 2016
1 parent 60f879a commit 5ec684d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions js/widget-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ jQuery(document).ready(function($) {
});

$('#widgets-right, #widgets-left, #customize-theme-controls').on( 'change', '.wc-field-select-condition select', function(){

show_hide_controls( $(this).parent().data('widget-id') );

});

$(document).bind( 'widget-updated', function( e, widget ) {
$( document ).on( 'widget-updated widget-added', function( e, widget ) {

show_hide_controls( widget.find('input[name="widget-id"]').val() );

});


});
});

0 comments on commit 5ec684d

Please sign in to comment.