Use mouseup event handlers on the bars or an interval to trigger recalculation and update of the payoffs based on the current constant sum allocations.
ChloeM,
These are two different approaches:
1. Event handlers like mouseup (when the user releases the mouse button) execute a function when the event happens. So this allows you to take specific actions when a user interacts with an html element on the page. Actually, in this case, I think you need to detect a mousedown on any element with a class of track followed by a mouseup on the window (i.e., the user has moved a slider which means values have changed which means you need to recalculate the payoffs and update your table)
2. An interval set using setInterval executes a function every x milliseconds. If you set the interval to 500 milliseconds your function would recalculate the totals and update the table every 1/2 second.
I would classify these types of scripts as intermediate level JS.
w3schools has tutorials on JavaScript and jQuery (jQuery is included in Qualtrics and makes JS programming easier, but you should really understand JS first). They also have tutorials on html and CSS, which are prerequisites for learning JS since JS interacts with html elements.