Hello! I want to create a multiple short text answer with different suffix for each "text". I want the question to look like this :
What is your dog's weight?
_______pound ________ounces
If it's not possible to create a question like the first example, the question could also look like this :
What is your dog's weight?
______pound
______ounces
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:scriptcomplete',function(){
// Change the first suffix
$('#question{QID} .suffix-text:eq(0)').text('years');
// Change the second suffix
$('#question{QID} .suffix-text:eq(1)').text('days');
// Change the third suffix
$('#question{QID} .suffix-text:eq(2)').text('hours');
});
</script>
Cheers,
Tony Partner Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Hello,
thanks for this solution! I am very happy to find a lot of helpful solutions in the forum.
Is it possible to use bold font for a part of the text which is manipulated in javascript? I need to add different suffixes, but some parts of it should be bold. I tried to implement HTML-code, but it doesn't work. The HTML-code is shown as text. Unfortunaltely, my javascript knowldege is rather elimentary.
<script type="text/javascript" data-author="Tony Partner">
$(document).on('ready pjax:scriptcomplete',function(){
// Change the first suffix
$('#question{QID} .suffix-text:eq(0)').html('<strong>Y</strong>ears');
// Change the second suffix
$('#question{QID} .suffix-text:eq(1)').html('<strong>D</strong>ays');
// Change the third suffix
$('#question{QID} .suffix-text:eq(2)').html('<strong>H</strong>ours');
});
</script>
Cheers,
Tony Partner Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.