Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fire event before request starts? #23

Open
adambedford opened this issue Mar 14, 2017 · 2 comments
Open

Fire event before request starts? #23

adambedford opened this issue Mar 14, 2017 · 2 comments

Comments

@adambedford
Copy link

It would be great if an event could be triggered before the AJAX request starts, for things such as progress bars!

@waymondo
Copy link
Owner

have you tried binding to the native jQuery ajax:beforeSend event?

https://api.jquery.com/Ajax_Events/

@adambedford
Copy link
Author

Thanks for your response, Justin. My use case might be a little unusual but I'm wanting to start and stop progress bars for Turboboost requests in an app that also uses Turbolinks. I'm using the built-in progress bar for Turbolinks because it works better than the third party library (Nprogress), however if I bind to ajax:beforeSend for Turboboost progress bars, they trigger twice for Turbolinks requests.

If this is something you're open to accepting a PR for, I could likely get something up this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants