Is there anyway to make the color of the numbers of the total field of a matrix table constant sum black instead of red?
Page 1 / 1
Hello @HPowell ,
Paste the below code in the js(OnReady) of the question:
jQuery("#"+this.questionId+" .SumTotal input[type='text']").css("color","black");
Paste the below code in the js(OnReady) of the question:
jQuery("#"+this.questionId+" .SumTotal input[type='text']").css("color","black");
Great. Thanks! I have one last part of this question...I have used JS to expand my input boxes on the same question, but the sum boxes do not line up. How do I get this corrected? My code is:
Qualtrics.SurveyEngine.addOnReady(function() {
jQuery(document).ready(function() {
var inputs = jQuery('[type=text]');
inputs.width("150px");
});
});
Qualtrics.SurveyEngine.addOnReady(function() {
jQuery(document).ready(function() {
var inputs = jQuery('[type=text]');
inputs.width("150px");
});
});
Actually, I tried adding your piece of code and it didn't work. My full code and the URL for testing is below:
Qualtrics.SurveyEngine.addOnReady(function() {
jQuery(document).ready(function() {
var inputs = jQuery('[type=text]');
inputs.width("150px");
jQuery("#"+this.questionId+" .SumTotal input[type='text']").css("color","black");
});
});
https://dimensional.co1.qualtrics.com/jfe/preview/SV_bpcJTINt5fqOfDD?Q_SurveyVersionID=current&Q_CHL=preview
Qualtrics.SurveyEngine.addOnReady(function() {
jQuery(document).ready(function() {
var inputs = jQuery('[type=text]');
inputs.width("150px");
jQuery("#"+this.questionId+" .SumTotal input[type='text']").css("color","black");
});
});
https://dimensional.co1.qualtrics.com/jfe/preview/SV_bpcJTINt5fqOfDD?Q_SurveyVersionID=current&Q_CHL=preview
Use the below code:
Qualtrics.SurveyEngine.addOnReady(function() {
var inputs = jQuery('[type=text]');
inputs.width("150px");
jQuery("#"+this.questionId+" .SumTotal input[type='text']").css("color","black");
});
Remove jQuery(document).ready(function() {)}; function wrap
Qualtrics.SurveyEngine.addOnReady(function() {
var inputs = jQuery('[type=text]');
inputs.width("150px");
jQuery("#"+this.questionId+" .SumTotal input[type='text']").css("color","black");
});
Remove jQuery(document).ready(function() {)}; function wrap
Interesting...why would the jQuery(document).ready(function(){}); throw this off? I thought this function made it safer to execute jQuery. Also, the sum boxes do not align with the input boxes...any help here is greatly appreciated!
> @HPowell said:
> Interesting...why would the jQuery(document).ready(function(){}); throw this off? I thought this function made it safer to execute jQuery. Also, the sum boxes do not align with the input boxes...any help here is greatly appreciated!
Alignment problem may be because of some other CSS or JS you may have in question or at global level in header.
> Interesting...why would the jQuery(document).ready(function(){}); throw this off? I thought this function made it safer to execute jQuery. Also, the sum boxes do not align with the input boxes...any help here is greatly appreciated!
Alignment problem may be because of some other CSS or JS you may have in question or at global level in header.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.