Scroll to a Section after Ajax Filter

If you want to scroll to a specific section on the page after ajax filtering has finished (let's say you want to scroll back up to the top) you can do this with some simple JavaScript.

  1. Add a custom class to a section or another element. For the purpose of this tutorial we are going to use "element"
  2. Go to Divi > Theme Options > Integration and add this code in the "body" section

That's it - now after the ajax filtering has completed, it will scroll up to this element.

You can fine-tune the position by changing the number "80".

Still need help? Contact Us Contact Us