Hi all,
I am trying to modify the embedded code for the widget to allow it to open automatically when someone loads the page, vs. having the user click the "?" logo to open up the widget. Any insight on what the code should be?
OG code:
<script data-jsd-embedded data-key="xx" data-base-url="https://jsd-widget.atlassian.com" src="https://jsd-widget.atlassian.com/assets/embed.js"></script>
Hello Anthony,
Welcome to Atlassian Community!
It's possible to make the widget to open automatically when accessing a page.
We tested here and the following code works correctly:
<script add your widget script here </script><script type="text/javascript">setTimeout(()=>{//gets the iframe on which the widget is embeddedlet iframe = document.querySelector('#jsd-widget');//gets the content of the iframelet iframeContent = iframe.contentDocument;//gets button which opens the widgetbutton = iframeContent.querySelector('#help-button');button.click();}, 1000)</script>
Please, give it a try and let us know how it goes.
Regards,Angélica
This worked beautifully! Thank you!
It looks like you're new here. Sign in or register to get started.