- Posts: 15
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var newColPosition = 3; // Identify this question var thisQuestion = $('#question{QID}'); // Insert a new column $('table.subquestion-list col:eq('+(newColPosition-1)+')', thisQuestion).after('<col class="inserted-column" />'); $('table.subquestion-list thead th:eq('+(newColPosition-1)+')', thisQuestion).after('<th class="inserted-column" />'); $('tr.subquestion-list', thisQuestion).each(function(i) { $('.question-item:eq('+(newColPosition-2)+')', this).after('<td class="inserted-column" />'); }); // Some styling $('.inserted-column', thisQuestion).css({ 'width': '1%', 'background': '#233140', 'padding': '0' }); }); </script>