woocommerce/assets/js/admin/meta-boxes-webhook.js

17 lines
479 B
JavaScript
Raw Normal View History

2014-12-16 21:07:48 +00:00
jQuery( function ( $ ) {
$( '#webhook-options #topic' ).on( 'change', function() {
var current = $( this ).val(),
action_event_field = $( '#webhook-options .action_event_field' ),
custom_topic_field = $( '#webhook-options .custom_topic_field' );
action_event_field.hide();
custom_topic_field.hide();
if ( 'action' === current ) {
action_event_field.show();
} else if ( 'custom' === current ) {
custom_topic_field.show();
}
}).change();
});