Thanks everyone for your help - I've got it working this morning just fine!
For others who may be looking, here's the code, abstracted from my functions in template.js.
Note that I tried to rewrite as little as possible in terms of slider function, and (as speed was of importance), I chose to use the change of the Hidden Input that happens when the slider is activated as the trigger for my function, rather than a listener on each slider.
Code:
function changeOtherSliderValue() {
$(document).ready(function() {
//listen for a change in any hidden field
$('input:hidden').change(function() {
//if the hidden field is part of a Multiple-Numeric question, take action
if ($('.numeric-multi').length > 0) {
//get questionID
var thisQuestion = $('.numeric-multi').attr('id');
//get triggering hidden input field ID
var thisHiddenID = $(this).attr('id');
//get entered value
var thisSliderValue = $(this).val();
//calculate the new value for the other slider (total = 5)
var otherSliderValue = 5 - thisSliderValue;
//split the hidden input ID to know which option was changed by user
var thisOption = thisHiddenID.split('SQ');
var thisOptionID = thisOption[1];
//build target IDs for both Hidden Input and Slider Text Input
var targetHiddenID = '#' + thisOption[0] + 'SQ';
var targetSliderID = '#slider_' + thisOption[0] + 'SQ';
//add appropriate option for the target
if (thisOptionID == '001') {
//target is 002
targetHiddenID += '002';
targetSliderID += '002';
} else {
//target is 001
targetHiddenID += '001';
targetSliderID += '001';
}
//call function to move target slider and update input values
$(thisQuestion).matchSliders(otherSliderValue,targetHiddenID,targetSliderID);
}
});
});
}
(function( $ ){
$.fn.matchSliders = function(val,targetHiddenID,targetSliderID) {
//move the target slider
$(targetSliderID).bootstrapSlider('setValue',val);
//store the value in both hidden and text inputs
$(targetSliderID).val(val);
$(targetHiddenID).attr('value',val);
//decide if Next button needs to be activated
disableQNext();
};
})( jQuery );