I have used the following script in a .phtml file


], function ($) {


My issue is after loading of page is keeps on clicking & reloading, I want to click this id only once after page load.


Please try with this code, hope its work for you.

$(document).ajaxComplete(function() {
       // enter your code here.
  • require([ 'jquery' ], function ($) { $(document).ajaxComplete(function() { $('#update-shipping-method-submit').trigger('click'); }); }); I tried still same – Arjun Jul 22 '19 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.