laipower/wp-content/plugins/easy-digital-downloads/assets/js/admin/discounts/index.js

22 lines
376 B
JavaScript
Raw Normal View History

/**
* Internal dependencies.
*/
import { jQueryReady } from 'utils/jquery.js';
/**
* DOM ready.
*/
jQueryReady( () => {
const products = $( '#edd_products' );
if ( ! products ) {
return;
}
/**
* Show/hide conditions based on input value.
*/
products.change( function() {
$( '#edd-discount-product-conditions' ).toggle( null !== products.val() );
} );
} );