Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

failed to run jquery to go to next page

  • devagonal
  • devagonal's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 9 months ago #216966 by devagonal
failed to run jquery to go to next page was created by devagonal
this code wont run, any ideas why?
Code:
$(document).ready(function(){
   (function(){
     $('#movenextbtn, #movesubmitbtn, #ls-button-submit').trigger('click');
   })();
});

but it run when i manually execute this on console:
Code:
$('#movenextbtn, #movesubmitbtn, #ls-button-submit').trigger('click');

im using Version 4.4.4+210212
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 9 months ago #216976 by tpartner
Replied by tpartner on topic failed to run jquery to go to next page
Try this:

Code:
<script type="text/javascript" data-author="Tony Partner">  
  $(document).on('ready pjax:scriptcomplete',function(){
 
    $('#ls-button-submit').trigger('click');
  });
</script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: devagonal
The topic has been locked.
  • devagonal
  • devagonal's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 9 months ago #216992 by devagonal
Replied by devagonal on topic failed to run jquery to go to next page
it works. thanks.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose