You could (and this is thinking off the top of my head) have an array of the timelines and search the array for the element.id that is clicked and then remove the associated timeline from the array. And then run a loop on the remaining timelines that runs the Hype “continueTimelineNamed” method.
Something like:
var timelines = ["t1", "t2", "t3", "t4", "t5" ];
var index = timelines.indexOf(element.id);
if (index >= -1) {
timelines.splice(index, 1);
}
for (var i=0; i < timelines.length; i++) {
hypeDocument.continueTimelineNamed(timelines[i], hypeDocument.kDirectionReverse, false)
}
hypeDocument.continueTimelineNamed(element.id, hypeDocument.kDirectionForward, true)
This is just off top of head haven’t had time to check if it works