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

More
4 years 3 months ago #216966 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.
More
4 years 3 months ago #216976 by tpartner
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.
More
4 years 3 months ago #216992 by devagonal
it works. thanks.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose