- Posts: 13
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ // Identify this question var thisQuestion = $('#question{QID}'); // Insert header text var insertedText = "<b>Which option do you prefer?</b>"; $('table.subquestion-list thead tr:last td:first', thisQuestion).addClass('inserted-header').append(insertedText); // Move element(s) $('.question-title-container', thisQuestion).append($('.question-valid-container', thisQuestion)); }); </script>
<style type="text/css">@media only screen and (min-width: 480px) { #question{QID} .question-title-container { width:35%; } #question{QID} .answer-container { width: 65%; } #question{QID} .question-valid-container { padding-left: 0; } } /* Teilfragentexte linksbündig */ .ls-answers tbody .answertext { text-align: left; } </style>
Please Log in to join the conversation.
Please Log in to join the conversation.
Yes, but without the "surrounding" linesIs the script field (in the screenshot) where I'm supposed to paste the Javascript?
// Identify this question var thisQuestion = $('#question{QID}'); // Insert header text var insertedText = "<b>Which option do you prefer?</b>"; $('table.subquestion-list thead tr:last td:first', thisQuestion).addClass('inserted-header').append(insertedText); // Move element(s) $('.question-title-container', thisQuestion).append($('.question-valid-container', thisQuestion));
No, here you'd enter "css classes" which you definde in your custom.css.I pasted the second code in the css class. I hope that is correct.
Please Log in to join the conversation.
Please Log in to join the conversation.
You see, I wrote that I prefer to enter this in the question text (in source code mode)Unfortunately I'm still unable to paste or type anything in the script field
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ alert("Hello, javascript speaking"); }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.