- Posts: 61
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
<script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ // Define the subquestion code to be fixed at the bottom of the array var fixedCode = '10'; // Identify the questions var qID = {QID}; var thisQuestion = $('#question'+qID); var nextQuestion = thisQuestion.nextAll('.text-short:eq(0)'); // Move the fixed row to the bottom $('table.subquestion-list tbody:eq(0)', thisQuestion).append($('tr[id$="X'+qID+fixedCode+'"]')); // Fix up the row background colours $('tr.answers-list', thisQuestion). each (function(i){ $(this).removeClass('ls-even ls-odd'); if(i % 2 == 0) { $(this).addClass('ls-even'); } else { $(this).addClass('ls-odd'); } }); // Hide the next question nextQuestion.hide(); // Move the text input $('tr[id^="javatbd"]:last th.answertext', thisQuestion).append($('.answer-item', nextQuestion)); // Clean-up styling $('th.answertext .answer-item', thisQuestion).css({ 'padding': 0 }); $('th.answertext .answer-item div', thisQuestion).css({ 'padding': 0 }); }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.