Welcome to the LimeSurvey Community Forum

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

Change focus to next question on page

More
6 years 6 months ago #195902 by tpartner
This will work in an array. You may need to adjust the topMargin variable.

Code:
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ $('#question{QID} input[type="radio"]').on('click', function() { var thisRow = $(this).closest('tr'); if($(thisRow).next('tr').length > 0) { var topMargin = 100; $('html, body').animate( { scrollTop: $(thisRow).next('tr').offset().top-topMargin }, 1000 ); } }); }); </script>

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
Moderators: tpartner, holch

Lime-years ahead

Online-surveys for every purse and purpose