0

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!

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by adishardis
0

Ups :) is there a way to move it or should i just start a new thread?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.