Never mind, I coded it on my own with jquery.
It’s an issue with Bootstrap 4. It works when Bootstrap 3 is selected in User Interface. I wonder if that can be fixed.