- Posts: 48
- 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() { // Define the subquestion code to be fixed at the bottom of the array var fixedCode = 'SQ009'; // Move that row to the bottom $('#question{QID} table.subquestion-list tbody:eq(0)').append($('tr[id$="X{QID}'+fixedCode+'"]')); // Fix up the row background colours $('#question{QID} tr.answers-list').each(function(i){ $(this).removeClass('ls-even, ls-odd'); if(i % 2 == 0) { $(this).addClass('ls-even'); } else { $(this).addClass('ls-odd'); } }); // Define the subquestion code to be fixed at the bottom of the array var fixedCode = 'SQ010'; // Move that row to the bottom $('#question{QID} table.subquestion-list tbody:eq(0)').append($('tr[id$="X{QID}'+fixedCode+'"]')); // Fix up the row background colours $('#question{QID} tr.answers-list').each(function(i){ $(this).removeClass('ls-even, ls-odd'); if(i % 2 == 0) { $(this).addClass('ls-even'); } else { $(this).addClass('ls-odd'); } }); }); </script>