select value to show another hidden dropdown box
Hi
I have this website
I have got this code from this forum.
here is the code
- $(document).on('change', 'select[name="Discount"]', function() {
- var $select = $(this);
- var $partnerBlock = $select.closest('.col-md-2').siblings('.partner');
- if ($select.val() === 'Yes') {
- $partnerBlock.addClass('show');
- } else {
- $partnerBlock.removeClass('show');
- }
- });
when I will select Discount "Yes", only then it will show me the Partner with partner list. The Partner will hidden bydefault, so no one can see it until the Discount is selected Yes
could you please help me to do that.
thank you