- Posts: 74
- Thank you received: 1
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // IDENTIFY THIS QUESTION var thisQuestion = $('#question{QID}'); // HIDE SUB-QUESTION $('.subquestions-list .col-responses .col-answers', thisQuestion).hide(); $('.subquestions-list thead td', thisQuestion).hide(); $('.subquestions-list .answertext', thisQuestion).hide(); $('.subquestions-list col', thisQuestion).attr('width', (100/$('.subquestions-list col', thisQuestion).length)+'%'); // ADD HEADER ROW $('table.subquestions-list thead', thisQuestion).prepend('<tr class="new-header">\ <th colspan="11" style="text-align:left;">Poor<span style="float:right">Excellent</span></th>\ </tr>'); }); </script>
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Insert the column categories $('#question{QID} table.subquestion-list thead tr:eq(0) td:eq(0)').remove(); $('#question{QID} table.subquestion-list thead').prepend('<tr class="ls-heading">\ <td rowspan="2" colspan="2"></td>\ <th class="answer-text inserted-header" colspan="3">Dissatisfied</th>\ <th class="answer-text inserted-header" colspan="5"> </th>\ <th class="answer-text inserted-header" colspan="3">Very Satisfied</th>\ </tr>'); }); </script>
What exactly do you like to get?so this script does work (though it doesn't get me exactly what i need)...
$(document).ready(function()
$(document).on('ready pjax:scriptcomplete',function()