- Posts: 222
- Thank you received: 10
Ask the community, share ideas, and connect with other LimeSurvey users!
tpartner wrote: The full-size array should only take a little basic jQuery manipulation but how do you want it to behave on smaller devices (phones)?
Can you attach a small sample survey containing only that array?
But hopefully the survey is going to be used only on bigger screens.
<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">Category 1</th>\ <th class="answer-text inserted-header" colspan="3">Category 2</th>\ </tr>'); // Insert the row categories $('#question{QID} table.subquestion-list colgroup').remove(); $('#question{QID} table.subquestion-list tr.answers-list:eq(0)').prepend('<th class="answertext inserted-header" rowspan="2">Category 1</th>'); $('#question{QID} table.subquestion-list tr.answers-list:eq(2)').prepend('<th class="answertext inserted-header" rowspan="2">Category 2</th>'); }); </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="1"></td>\ <th class="answer-text inserted-header" colspan="3">Category 1</th>\ <th class="answer-text inserted-header" colspan="3">Category 2</th>\ </tr>'); // Insert the row categories }); </script>