I’m using the jQuery library https://datatables.net/ in a project, but inside the panel. As you can see, the table uses for it’s pagination anchor tags without the href attribute. Still, when I’m clicking on the anchor, the kirby panel app JS fires a new request and reloads the page, so that the pagination starts at 1 again, although I’m trying to paginate through the table.
So I tried to integrate an event event.preventDefault() script on this anchors below the table, but still it won’t work.
Does anyone have an idea how I can prevent the app JS to load a new page when clicking on anchors?
Since the Panel uses event handlers as well, you need event.stopPropagation(). I don’t know if that helps though. It depends on the order the event handlers are called.