- Posts: 23
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:complete',function() { // Listener on radios var questions = $('.list-radio:lt(2)'); var q1 = $('.list-radio:eq(0)'); var q2 = $('.list-radio:eq(1)'); $('input[type="radio"]', questions).on('change', function(e) { var q1Answer = Number($('input[type="radio"]:checked', q1).val()); var q2Answer = Number($('input[type="radio"]:checked', q2).val()); if($('input[type="radio"]:checked', questions).length == 2 && q1Answer < q2Answer) { $('#movenextbtn, #movesubmitbtn').prop('disabled', true); } else { $('#movenextbtn, #movesubmitbtn').prop('disabled', false); } }); }); </script>
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:complete',function() { // Clean up the question appearance $('#question{QID} .answer-container').remove(); $('#question{QID} .question-title-container').css('padding', '0'); $('#question{QID} .questionvalidcontainer').css('padding', '1em'); }); </script>