Hi all,
I'm trying to show an image based on an answer selections in a list-type question.
The item is 856216X180X1269 and the value codes for answers are 1,2,3 etc.
In my template question.pstpl, I have <img id="variableimage" src="path/currentimage />. This is the img in which I would like to alter the src based on the response.
In template.js, I have this:
$(document).ready(function() {
if ($('#java856216X180X1269').attr.value =='1' ) {
$('#variablelogo').attr('src', '
www.fullpath.com/surveyassets/images/image1.png
');
}
})
I hoped that if they select Answer Option 1, then Image 1 would appear. I think I would have to tie this to the change event of the question, but I'm afraid this is beyond me. This is what I have so far - and it doesn't work. It would be grand if someone could point me in the right direction.
Thank you in advance,
David