- Posts: 9
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
.no-question{border-top:0;} .no-question .question-title-container{display:none;} .no-question .question-valid-container{display:none;} .no-question .answer-container { padding-top: 0em; padding-bottom: 0.5em; } .no-bottom{border-bottom:0;margin-bottom:0;} .no-bottom .answer-container { padding-bottom: 0em; }
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { // Identify this question var thisQuestion = $('#question{QID}'); // Insert the new header rows $('tr.answers-list:eq(0)', thisQuestion).before('<tr>\ <td></td>\ <th style="text-align:center;">very long</th>\ <th style="text-align:center;">long</th>\ <th style="text-align:center;">neither/nor</th>\ <th style="text-align:center;">short</th>\ <th style="text-align:center;">very short</th>\ </tr>'); $('tr.answers-list:eq(2)', thisQuestion).before('<tr>\ <td></td>\ <th style="text-align:center;">very good</th>\ <th style="text-align:center;">good</th>\ <th style="text-align:center;">neither/nor</th>\ <th style="text-align:center;">poor</th>\ <th style="text-align:center;">very poor</th>\ </tr>'); $('tr.answers-list:eq(4)', thisQuestion).before('<tr>\ <td></td>\ <th style="text-align:center;">very high</th>\ <th style="text-align:center;">high</th>\ <th style="text-align:center;">neither/nor</th>\ <th style="text-align:center;">low</th>\ <th style="text-align:center;">very low</th>\ </tr>'); }); </script>
Regarding that last example.. is there a way to avoid to insert new headers, and simply put the information that in the example are in the new headers into tooltips?
Yes, because he thinks, this is the best way to confuse people.He is providing those, because he probably thinks ...
$(function () { $('[data-bs-toggle="tooltip"]').tooltip() }) $(document).ready(function() { $('#question{QID} tr.answers-list:eq(0) .answer_cell_1 *').attr('title','This is cell 1 in the first row'); $('#question{QID} tr.answers-list:eq(0) .answer_cell_2 *').attr('title','This is cell 2 in the first row'); ... $('#question{QID} tr.answers-list:eq(4) .answer_cell_4 *').attr('title','This is cell 4 in the fifth row'); ... }); </script>