I have a array with 40 questions. The array has radio buttons and possible answers are yes/no/maybe.
I would like to have a last line in the array that gives the options to set all yes/all no/all maybe for the other 40 questions.
In fact, loading the array with all radio's in the first column selected would be great...
But this code is not working in Lime 3.22
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){var qID =2768;// Loop through the rows and check the first radio if none are already checked
$('#question'+qID+' table.question tbody tr').each(function(i){if($('input.radio:checked', this).length ==0){
$('input.radio:eq(0)', this).attr('checked',true);}});});</script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){// Identify this question IDvar qID ={QID};// Loop through the rows and check the first radio if none are already checked
$('#question'+qID+' .table-array-radio tr.answers-list').each(function(i){if($('input[type="radio"]:checked', this).length ==0){
$('input[type="radio"]:eq(0)', this).trigger('click');}});});</script>