Saurabh Kapoor
Saurabh Kapoor

Reputation: 1

onchange input value trigger select option change not working

jQuery(document).ready(function() {
  jQuery("#delivery_date").change(function(){
    jQuery("#shipping_method_0").trigger('change');
  });
});

If a user clicks on the input, the Select option automatically refreshes.

Upvotes: 0

Views: 36

Answers (1)

Ankit Agarwal
Ankit Agarwal

Reputation: 30739

I had same issue on mobile and the below convention solved it.

jQuery(document).ready(function() {
  jQuery("#delivery_date").on('change', function(){
    jQuery("#shipping_method_0").trigger('change');
  });
});

and for change event in shipping_method_0 follow the same structure.

jQuery("#shipping_method_0").on('change', function(){
    //code goes here
});

Upvotes: 1

Related Questions