Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- // Pop-Up Close And Scroll V2:
- // Pop-up button closes and scrolls to a section
- // Closer X closes but does NOT scroll
- jQuery('.modal-body [data-component="button"] a').on('click', function (ev) {
- ev.preventDefault();
- // Supports multiple sections; will scroll to the visible one
- jQuery('#_8u3ip7yc1:visible, #_luiyxh20t:visible').each(function () { this.scrollIntoView(); });
- jQuery('.modal button.closer.close').click();
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement