0
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.

10
  • automatically refreshes What does this mean? Please share a working snippet using <> demonstrating your attempt and issue. Commented Dec 29, 2017 at 13:39
  • above code working properly in desktop, if u check in mobile code not working. Commented Dec 29, 2017 at 13:40
  • Post a fiddle pls Commented Dec 29, 2017 at 13:41
  • dpsainiflorist.com/checkout Commented Dec 29, 2017 at 13:52
  • check shipping time Commented Dec 29, 2017 at 13:53

1 Answer 1

1

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
});
Sign up to request clarification or add additional context in comments.

1 Comment

This has exact same behaviour than OP's posted code api.jquery.com/change/#entry-longdesc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.