- Posts: 7
- 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 = 6; // Identify this question ID var qID = {QID}; // Insert a new column $('#question'+qID+' table.question col:eq('+(newColPosition-1)+')', this).after('<col class="inserted-column" />'); $('#question'+qID+' table.question thead th:eq('+(newColPosition-2)+')', this).after('<th class="inserted-column" />'); $('#question'+qID+' table.question tbody tr').each(function(i) { $('td:eq('+(newColPosition-2)+')', this).after('<td class="inserted-column" />'); }); }); </script>
.inserted-column { padding: 1px !important; background-color: #000000 !important; }
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var newColPosition = 6; // Identify this question ID var qID = {QID}; // Insert a new column $('#question'+qID+' table.question.subquestions-list col:eq('+(newColPosition-1)+')', this).after('<col class="inserted-column" />'); $('#question'+qID+' table.question.subquestions-list thead th:eq('+(newColPosition-2)+')', this).after('<th class="inserted-column" />'); $('#question'+qID+' table.question.subquestions-list tbody tr').each(function(i) { $('td:eq('+(newColPosition-2)+')', this).after('<td class="inserted-column" />'); }); }); </script>
.inserted-column { padding: 4px !important; background-color: #999999!important; }