Show Turbolinks download bar in AJAX custom request

I use Turbolinks 5, and there is this nice download bar at the top that appears for turbo-activated links.

Is it possible to manually / programmatically trigger the display / progress of this line for custom AJAX calls (perhaps even any AJAX call?)

I specifically aim to submit remote forms (AJAX) for POST / GET requests. I know about the turbo formats that I sometimes use, but in some cases I expect a smarter JS response from the server that only generates / reloads part of the page, and I would still like to use Turbolinks' AJAX feedback.

+4
source share
1 answer

Based on a list of turbolink events , it seems possible to display a panel that triggers an event turbolinks:click.

It also seems possible to call the progressbar class itself.

Hope this helps you on the right track.

Happy coding

+1
source

All Articles