Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi
  • Page :
  • 1
  • 2

SUJET : Seamlessy combine different multiple choice questions

Seamlessy combine different multiple choice questions il y a 1 an 5 mois #95565

  • Limer2001
  • Portrait de Limer2001
  • Hors ligne
  • Fresh Lemon
  • Messages : 18
  • Remerciements reçus 2
  • Karma: 0
Hm sloppy, removed it but still not working.
L'administrateur a désactivé l'accès en écriture pour le public.

Seamlessy combine different multiple choice questions il y a 1 an 5 mois #95615

  • tpartner
  • Portrait de tpartner
  • Hors ligne
  • LimeSurvey Team
  • Messages : 4272
  • Remerciements reçus 806
  • Karma: 369
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.
L'administrateur a désactivé l'accès en écriture pour le public.
  • Page :
  • 1
  • 2
Modérateurs: ITEd
Temps de génération de la page : 0.143 secondes
Donation Image