Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:
  • Seite:
  • 1
  • 2

THEMA: Seamlessy combine different multiple choice questions

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95565

  • Limer2001
  • Limer2001s Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 18
  • Dank erhalten: 2
  • Karma: 0
Hm sloppy, removed it but still not working.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Seamlessy combine different multiple choice questions 11 Monate 2 Wochen her #95615

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 3813
  • Dank erhalten: 683
  • Karma: 328
You have a syntax error.

This line:
$(".answer").css("padding":"0");

Should be:
$(".answer").css("padding", "0");

Or:
$(".answer").css({
	"padding":"0"
});

The CSS required to make those two questions appear as one is:
#question436 table td {
  height: auto;
}
 
#question436 table.scs {
  border-bottom: 0 none;
}
 
#question436 .survey-question-help {
  display: none;
}
 
#question436 .subquestions-list {
  margin: 0;
}
 
#question436 .answer {
  padding: 0;
}
 
#question437 table.scs {
  border-top: 0 none;
}
 
#question437 td.be {
 display: none;
}
 
#question437 .survey-question-help {
  display: none;
}
 
#question437 .subquestions-list {
  margin: 0;
}
 
#question437 .answer {
  padding: 0;
}

So, to translate that into JavaScript, add this to the first question:
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
 
		$(#question{QID} table td).css({ // Table cell heights
			'height': 'auto'
		});
 
		$(#question{QID} table.scs).css({ // Table border
			'border-bottom': '0 none'
		});
 
		$(#question{QID} .survey-question-help).css({ // Question help
			'display': 'none'
		});
 
		$(#question{QID} .subquestions-list).css({ // Margin around answers
			'margin': '0'
		});
 
		$(#question{QID} .answer).css({ // Padding around answers
			'padding': '0'
		});
	});
</script>

And add this to the second question:
<script type="text/javascript" charset="utf-8">
	$(document).ready(function() {
 
		$(#question{QID} table td).css({ // Table cell heights
			'height': 'auto'
		});
 
		$(#question{QID} table.scs).css({ // Table border
			'border-top': '0 none'
		});
 
		$(#question{QID} td.be).parent().css({ // Question text
		 'display': 'none'
		});
 
		$(#question{QID} .survey-question-help).css({ // Question help
			'display': 'none'
		});
 
		$(#question{QID} .subquestions-list).css({ // Margin around answers
			'margin': '0'
		});
 
		$(#question{QID} .answer).css({ // Padding around answers
			'padding': '0'
		});
	});
</script>


Capture2_2013-05-03.JPG
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
  • Seite:
  • 1
  • 2
Moderatoren: ITEd
Ladezeit der Seite: 0.159 Sekunden
Donation Image