I am using the button from siteorigin widgets to execute some javascript code. And it works beautifully!
However after executing the code it shows the top of the page.
I have tried various versions of the code to set focus to an element on my page, but to no avail.
A button with no code also acts in the same way.
Any assistance would be much appreciated.
Andrew McGurk
Hi Andrew
Thanks for reaching out.
Is the Button widget part of the challenge? You could perhaps run a quick test. Create a new test page and add a button manually:
Replacing the function above with your JS. Does the issue persist?
Thank you, that works fine.
I guess I wasn’t using the SiteOrigin buttons correctly.
Or something…!
Thanks again for your prompt and correct response.
Andrew McGurk
Hi Andrew
Thanks for running the test. If this works then you can use it as an alternative option. In Page Builder you could insert your code into the Custom HTML widget. It sounds like the Button widget might have been part of the issue, if you’d like me to take a look, please, send a link to a page showing the issue or a test page.