peckadesign / pd-naja

1 stars 0 forks source link

feature: Add `ScrollToExtension` for AJAX requests #11

Closed zipper closed 8 months ago

zipper commented 8 months ago

The commit introduces a new ScrollToExtension that allows automatic scrolling when AJAX requests start or finish. The event on which the scrolling will be triggered (either before or success), is defined with the defaultScrollToEvent property passed into constructor (before is the default). The behavior can be further customised using the data-naja-scroll-to and data-naja-scroll-to-event HTML attributes. See the readme for a full description