Hi Everyone,
What I want to do is have two sliders which interact with each other to always equal a maximum e.g. when one is at 7 the other automatically gets set to 3 and vice versa.
The code I have at the moment is:
Qualtrics.SurveyEngine.addOnReady(function()
{
var currentQID = this.questionId
jQuery("#" + currentQID + "~1~track.track." + currentQID +"-1-track").mouseup(function() {
var slid1 = parseInt(jQuery("#" + currentQID +" input.ResultsInput").eq(1).val());
jQuery("#" + currentQID +" input.ResultsInput").eq(2).val(10-slid1);
});
jQuery("#" + currentQID + "~2~track.track." + currentQID +"-2-track").mouseup(function() {
var slid2 = parseInt(jQuery("#" + currentQID +" input.ResultsInput").eq(2).val());
jQuery("#" + currentQID +" input.ResultsInput").eq(1).val(10-slid2);
});
});
And the problem I have is that the mouseup function does not pick up on the ID I have put in. I should preface that I'm a noob (or Qubie) at coding so please be kind and explain in detail where I have gone wrong.
Thanks in advance for any help
Nathan
Question
Two dynamically interactive sliders
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
