- Posts: 34
- Thank you received: 1
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(){ // Number of items to move into the second column var moveNumber = 2; // Identify this question var thisQuestion = $('#question6646'); // Move the textarea below the radios $('.answer-item.text-item', thisQuestion).removeClass('col-sm-6'); // Insert a new column $('.answers-list.radio-list:eq(0)', thisQuestion).after('<div class="answers-list radio-list col-sm-6 col-xs-12">\ <ul class="list-unstyled" role="radiogroup"></ul>\ </div>'); // Move the items var itemsLength = $('.radio-item', thisQuestion).length; console.log(itemsLength-moveNumber); $('.radio-item:gt('+(itemsLength-moveNumber-1)+')', thisQuestion).appendTo($('.answers-list.radio-list:eq(1) ul:eq(0)', thisQuestion)); }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
<script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ // Number of items to move into the second column var moveNumber = 2; // Identify this question var thisQuestion = $('#question6646'); // Move the textarea below the radios $('.answer-item.text-item, answers-list radio-list', thisQuestion).removeClass('col-sm-6'); // Insert a new column $('.answer-item.text-item', thisQuestion).after('<div class="answers-list radio-list col-xs-12">\ <ul class="list-unstyled" role="radiogroup"></ul>\ </div>'); // Move the items var itemsLength = $('.radio-item', thisQuestion).length; $('.radio-item:gt('+(itemsLength-moveNumber-1)+')', thisQuestion).appendTo($('.answers-list.radio-list:eq(1) ul:eq(0)', thisQuestion)); }); </script>
Please Log in to join the conversation.