Ajaxinate
Ajaxinate copied to clipboard
Added Loading Event Functions
Hello All,
This is my first ever PR so I hope I don’t screw it up too bad. I’ve added a function that fires before the get request called loadingStart and changed the callback function to be loadingEnd to match.
These events allow users to make changes to the DOM outside of the pagination div (ie: show and hide a loading spinner or a modal), or fire off other events like Google Analytics tracking.
I have also added a setting useDefault which is true by default but if set to false removes the function that edits the pagination link to show the loading text.
That’s it. Let me know if there’s anything you’d like me to improve on!
@matthewlyons This looks great! I’ll review fully ASAP. Nice one! Most of us don’t do anywhere near as well in our first PR. I definitely didn’t 😅
Thanks Cam! Let me know if there's anything you'd like me to change!