- Posts: 2
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
<script type="text/javascript" charset="utf-8"> $(document).ready(function() { var thisQuestion = '#question{QID}'; var namesArr = ['name1', 'name2', 'name3', 'name4']; //approach1 for (i=0, len=namesArr.length; i<len; i++){ $('td.answers-list', thisQuestion).push(namesArr) }; //approach2 $('.answer-item'. thisQuestion).each(function(i) { $(this).append(namesArr) }); //approach3 $('tr.answers-list', thisQuestion).each(function(i) { $(this).append('<td class="answer-item text-item">namesArr </td>\'); }); alert("this: " +thisQuestion+ $('#question{QID} input:text').val()); )}; </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.