- Posts: 10223
- Thank you received: 3640
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" data-author="Tony Partner"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify some elements var thisQuestion = $('#question{QID}'); var thisTable = $('table.subquestion-list', thisQuestion); // Adjust column widths var spacerWidthPercent = 2; var labelWidth = ($('col:first', thisTable).width()/$('colgroup:first', thisTable).width())*100; var answerWidth = (100-labelWidth-spacerWidthPercent)/$('col:gt(0)', thisTable).length; $('col:gt(0)', thisTable).width(answerWidth+'%'); // Insert some elements $('col:last', thisTable).before('<col class="inserted-spacer">'); $('thead th:last-child, tr.ls-heading-repeat th:last-child', thisTable).before('<th class="inserted-spacer" />'); $('tbody td.answer-item:last-child', thisTable).before('<td class="inserted-spacer" />'); }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
.radio-item label::before { border: 2px solid #6E748C; background-color: #C6C6C6; }
$(document).on('ready pjax:scriptcomplete',function(){ $('.array-flexible-row.inserted-spacer-question').each(function(e) { // Identify some elements var thisQuestion = $(this); var thisTable = $('table.subquestion-list', thisQuestion); // Adjust column widths var spacerWidthPercent = 4; var labelWidth = ($('col:first', thisTable).width()/$('colgroup:first', thisTable).width())*100; var answerWidth = (100-labelWidth-spacerWidthPercent)/$('col:gt(0)', thisTable).length; $('col:gt(0)', thisTable).width(answerWidth+'%'); // Insert some elements $('col:last', thisTable).before('<col class="inserted-spacer">'); $('thead th:last-child, tr.ls-heading-repeat th:last-child', thisTable).before('<th class="inserted-spacer" />'); $('tbody td.answer-item:last-child', thisTable).before('<td class="inserted-spacer" />'); //$('col:last', thisTable).addClass('radio-item-nr'); }); });
Please Log in to join the conversation.
.inserted-spacer-question .radio-item:last-child label::before { border-color: #CCCCCC; background-color: #FFFFFF; } .inserted-spacer-question .radio-item:last-child label::after { background-color: #CCCCCC; }
Please Log in to join the conversation.
Please Log in to join the conversation.