Is there a way to use custom code to manually invoke a scroll to a specific target? I would like the user to scroll to a specific page section when he clicks a submit button. I tried to assign an ID to the submit button and the use $(“body”).ScrollTo(‘#target’); but that doesn’t work.
If I understand it correctly, the button is a Form button?
Then:
I think its possible if the user stays on the same page by using an interaction. If you use the “onclick” as a trigger, you can send the page up or down by a certain amount of pixels, or percentages.
A second option is to make the redirect url from the form to go to: pagename.html/#anchor if you go to a new page. Use the /#anchor (or #anchor, i’m not sure) to stay on current page.
Third: If the button isn’t a form button but just any ordinary button, then the target of the button could be to an anchor too.
Never mind. I already got it working. Turns out I misspelled the ID in the custom code section.
Couldn’t get it to work using redirect or interactions though.