I think I prefer the blue of the standard template
Last comment for other users: I updated the code so that the heading will span across the table (ie: added colspan to th, removed td, right after the "// Insert the new row")
Code:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// Call the function
insertSubHeading('{QID}', 1, 'Traditionele platformen');
insertSubHeading('{QID}', 8, 'Digitale platformen die niet horen bij bovenstaande 'traditionele media'');
});
function insertSubHeading(qID, rowNum, text) {
// Identify some stuff
var thisQuestion = $('#question'+qID+'');
var cols = $('table.subquestion-list thead tr:eq(0) > *', thisQuestion).length;
// Insert the new row
$('#question'+qID+' table.subquestion-list tbody tr:eq('+(rowNum-1)+')').before('<tr class="subHeading"><th class="answertext subHeading" colspan="'+(cols)+'">'+text+'</th></tr>');
// Fix up the row classes
var rowClass = 1;
$('table.subquestion-list tbody tr', thisQuestion).each(function(i) {
if($(this).hasClass('subHeading')) {
rowClass = 1
}
else {
rowClass++;
$(this).removeClass('array1 array2')
if(rowClass % 2 == 0) {
$(this).addClass('array2');
}
else {
$(this).addClass('array1');
}
}
});
}
</script>
And added the following to "css/flat_and_modern.css" (based on default template of v. 2.5):
Code:
/* Array table Subheading*/
.subHeading {
background-color: #233140;
color: #ffffff;
font-weight: normal;
padding-top: 1em !important;
}