toggle metabox classes on boxes added via ajax

This commit is contained in:
Manos Psychogyiopoulos 2015-08-14 09:38:22 +03:00
parent 2da4ea0084
commit a86403f884
1 changed files with 2 additions and 4 deletions

View File

@ -27,10 +27,8 @@ jQuery( function ( $ ) {
}
});
$( function() {
$( '.wc-metabox > h3' ).click( function() {
$( this ).parent( '.wc-metabox' ).toggleClass( 'closed' ).toggleClass( 'open' );
});
$( '.wc-metaboxes-wrapper' ).on( 'click', '.wc-metabox h3', function( event ) {
$( this ).parent( '.wc-metabox' ).toggleClass( 'closed' ).toggleClass( 'open' );
});
// Tabbed Panels