- Posts: 14
- Thank you received: 2
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // The number of answers to be fixed at the end of the list var fixedAnswers = [color=red][b][size=5]2[/size][/b][/color]; // Identify this question var qID = {QID}; // Find the number of answers var ansCount = $('#question'+qID+' .answer-item').length; // Place the last n answers created at the end of the list var fixedIndex = fixedAnswers - 1; for (var i=0; i<fixedAnswers; i++) { var answerItem = $('.answer-item[id^="javatbd"][id$="X'+qID+(ansCount-fixedIndex)+'"]'); if($('#question'+qID).hasClass('multiple-opt')) { $(answerItem).closest('.subquestion-list').append($(answerItem).parent()); } else { $(answerItem).closest('.answers-list').append(answerItem); } fixedIndex--; } }); </script>