failed to run jquery to go to next page

More
3 months 2 weeks ago #216966 by devagonal
this code wont run, any ideas why?
$(document).ready(function(){
   (function(){
     $('#movenextbtn, #movesubmitbtn, #ls-button-submit').trigger('click');
   })();
});

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

im using Version 4.4.4+210212

Please Log in to join the conversation.

More
3 months 2 weeks ago #216976 by tpartner
Try this:

<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

Please Log in to join the conversation.

More
3 months 1 week ago #216992 by devagonal
it works. thanks.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now