Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all articles
Browse latest Browse all 17529

Add Colors in questions - by: tpartner

$
0
0
From your mock-up, it appears that you also want to colour the header labels.

1) Assign a question class "coloured-array".


2) Add something like this to the end of template.js:
$(document).ready(function() {
	$('.coloured-array').each(function(i) {
		// Assign column-specific classes
		$('table.subquestion-list tr', this).each(function(i) {
			$('> *:gt(0)', this).each(function(i){
				$(this).addClass('column-'+(i+1));
			});
		});
	});
});

3) Add something like this to the end of template.css:
.coloured-array .column-1 {	background-color: #FF5B5B;}
 
.coloured-array .column-2 {	background-color: #FF9B57;}
 
.coloured-array .column-3 {	background-color: #F4F781;}
 
.coloured-array .column-4 {	background-color: #99FDA3;}
 
.coloured-array .column-5 {	background-color: #53C170;}





Viewing all articles
Browse latest Browse all 17529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>