Any JS can be used in Plone 5.
If you are working on a theme, just put your JS in your Diazo. If you are working on an add-on, declare your JS in a bundle (see this example https://github.com/collective/example.p4p5).
This is a common pattern and a class to achieve it was available in Plone 4; IIRC, .
@vangheem just told me the other day we have a pattern available to do such thing in Plone 5, but I can't remember the name.
This need to be documented.
There may be a good case for taking some of what is documented in mockup examples and moving to docs.plone.org?
Anyway, I think this is the pattern you are looking for: http://plone.github.io/mockup/dev/#pattern/tablesorter
...which is not to be confused with the "sortable" pattern (which is for manual item re-ordering of lists and tables).
The tablesorter-pattern was removed for Plone 5.0b4 in https://github.com/plone/mockup/commit/e4cf1efb since Plone itself does not use it.
Was this moved to a different package that can installed on its own, or just deleted? I have a lot of plone 4 templates with tables using the "listing" class so I'm looking for a Plone 5 solution for them.
Tons of add-ons used it....major compatibility foul.
I was able to use this in my Plone 5 site. http://www.kryogenix.org/code/browser/sorttable/