- Posts: 12188
- Thank you received: 2865
Ask the community, share ideas, and connect with other LimeSurvey users!
YepSo some kind of animation (even if small, short and simple) would be good.
if(visibleQ.find('.radio:checked').length > 0) { answeredTotal++; var nextQ = visibleQ.next('.mandatory') visibleQ.fadeOut(400, function() { nextQ.fadeIn(400); }); }
$(document).ready(function(){ $(".list-dropdown select").change(function(){ if($(this).val()!="" && $(this).val()!="-oth-"){ $("#movenextbtn,#movesubmitbtn").delay(300).click(); } }); $('tr.radio-list input.radio').bind('click', function () { var thisArray = $(this).closest('table'); if($('input.radio:checked', thisArray).length == $('tr.radio-list', thisArray).length) { $("#movenextbtn,#movesubmitbtn").delay(300).click(); } }); });
function autoForward() { var timeOut = ''; if($('.radio').length > 0 && $('.radio:checked').length === 0) { var totalQuestions = 0; var dualScaleQuestions = $('div.array-flexible-duel-scale:visible').length if(dualScaleQuestions > 0){ totalQuestions = totalQuestions = $('div.list-radio:visible').length + ($('tr.radio-list:visible').length * 2); }else{ totalQuestions = totalQuestions = $('div.list-radio:visible').length + $('tr.radio-list:visible').length; } $('.radio').on('change', function () { clearTimeout(timeOut); if ($('.radio:checked').length === totalQuestions && !$(this).closest('.answer-item').hasClass('other-item') && $('textarea:visible').length === 0 && $('.checkbox:visible').length === 0) { timeOut = setTimeout(function () { $('#movenextbtn').click(); }, 500); } }); } }