Hi,
what I see, is exactly what the script is thought for.
And the new rows are inserted before the first row and before the third row.
// Insert the new rows
$('tr.answers-list:eq(0)', thisQuestion).before('<tr class="sub-header-row"><th colspan="'+columnsLength+'">'+subHeading1+'</th></tr>');
$('tr.answers-list:eq(2)', thisQuestion).before('<tr class="sub-header-row"><th colspan="'+columnsLength+'">'+subHeading2+'</th></tr>');
Maybe your intention of inserting headers is different.
On the other side I have not the least idea how this question is to answer.
Why can't both twins have the answer "Yes", resp. both "No"?
You should really revise the design.
Most of your questions should be swapped (your intention is an array(columns) instead array.
holch mentioned that before.
Now you never are able to give the same answer for both twins, e.g. Q6 "Cows milk".
Twin 1 can answer "Yes" and "No", but not both can answer "Yes".
And I see in Q3 (and other places):
Yes (Goto Q5)
No (Goto Q7
Refused (Goto Q9)
Please read the manual about relevance equations.
Joffm