Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all articles
Browse latest Browse all 17529

Change slider numeric value with javascript - by: tpartner

$
0
0
Here's a script for LimeSurvey version 2.5x:

<script type="text/javascript" charset="utf-8">
 
	$(document).ready(function() {
 
		// Identify this question
		var thisQuestion = $('#question{QID}');
 
		$('input[type="text"]', thisQuestion).on('slide slideStop', function(event, ui) {
			var otherSlider = $('input[type="text"]', thisQuestion).not(this);
			otherSlider.bootstrapSlider('setValue', 100 - $(this).val());
		});
    });
</script>

A sample survey:

File Attachment:

File Name: limesurvey_survey_183989.lss
File Size: 17 KB

Viewing all articles
Browse latest Browse all 17529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>