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!

Wrong forum. This one is for java.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.