Charlie,
The problem you presented, i.e. sorting a table column, then selecting a pop-up note - creates a problem! The pop-up effectively leaves the javascript sorting the page 'dead in the water.' The reason is that javascript is asynchronous; meaning that when doing it's knitting, if it 'drops a stitch', it can't just stop and go back to the 'dropped stitch' some time later.
The thing that springs to my mind
is:- forget the SortTable script and instead deal with the
pop-up.
I believe that the pop-up can be replaced with a pseudo element generated note using the -
a#noteOne::after {content:'text and/or image'; and any other CSS needed to present it;} when the 'note link' is hovered over.
So, what could have been a simple job, has probably turned into a time consuming one. Would you like me to do a few examples for you?
Barry