Change image depending on value of Multiple numerical input with limesurvey
I'm trying to use limesurvey but cannot get the slider as i would like it. Here is a link to the surveyquestion: http://adam.synology.me/limesurvey/index.php/survey/index/sid/164171/newtest/Y/lang/sv
I want the images to change according to the value of the sliders. With a regular html form i had this to take care of it:
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$("#slider").change(function() {
sVal = $(this).val();
if(sVal <= 49) {
$('#theImage').attr('src','http://xxx.com/img/img1.png');
}
if(sVal > 49 && sVal <= 100) {
$('#theImage').attr('src','http://xxx.com/img/img2.png');
}
});
});//]]>
</script>
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$("#slider").change(function() {
sVal = $(this).val();
if(sVal <= 49) {
$('#theImage2').attr('src','http://xxx.com/img/img2.png');
}
if(sVal >= 50 && sVal <= 100) {
$('#theImage2').attr('src','http://xxx.com/img/img3.png');
}
});
});//]]>
</script>
But I cannot for the life of me figure out what to change to get it working on limesurvey!
Any thoughts would be greatly appreciated!
47 Minutes
Discussion Span
Related Article: change image
is a Java discussion thread by chira.laura.9 that has 1 reply and was last updated 4 months ago.
adishardis
Junior Poster in Training
91 posts since Jun 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0
Wrong forum. This one is for java.
NormR1
Posting Sage
7,742 posts since Jun 2010
Reputation Points: 1,158
Solved Threads: 793
Skill Endorsements: 16
Ups :) is there a way to move it or should i just start a new thread?
adishardis
Junior Poster in Training
91 posts since Jun 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0