- Posts: 6
- 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() { // Call the function with the question ID followed by a comma-separated list of suffixes addSuffixByRow({QID}, '%', '$', 'hours', 'km'); // Function to add row-specific suffixes to an array function addSuffixByRow() { var qID = $(arguments)[0]; // Some styling $('#question'+qID+' input[type="text"]').css({ 'width': '50%' }); // Insert the suffixes $(arguments).each(function(i, val){ if(i > 0) { $('#question'+qID+' tr.subquestion-list:eq('+(i-1)+') input[type="text"]').after(this); } }); } }); </script>
$('#question'+qID+' tr.subquestion-list:eq('+(i-1)+') input[type="text"]').after(this);
$('#question'+qID+' tbody[id^="javatbd"]:eq('+(i-1)+') input[type="text"]').after(this);
$('#question'+qID+' tbody[id^="javatbd"]:eq('+(i-1)+') input[type="text"]').after(val);