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 embedded
let iframe = document.querySelector('#jsd-widget');
//gets the content of the iframe
let iframeContent = iframe.contentDocument;
//gets button which opens the widget
button = 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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the wake of growing customer expectations, development teams are facing more pressure to deliver innovations faster. Register for this 45-minute webinar to learn how devs can accelerate software delivery and time-to-market with Jira Service Management.
Register now 🚀Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.