I'm writing a plugin that adds some Information to the issue details view.
<div id="myContent">my content</div>
document.getElementById("myContent").innerHTML = "my new content";
the point is that JIRA seems to reassemble the order of the elements. When I test my plugin the getElementById() always fails, because the corresponding element is not yet available in the DOM.
So my question is: how can I ensure, that certain parts of the DOM are available when my script is executed.
Ideal thing to do is to use a JS file and load it as a resource using the web resource module. And of course, add your code in the ready function because you want to execute it only after the page is loaded.
Hey admins! I’m Dave, Principal Product Manager here at Atlassian working on our cloud platform and security products. Cloud security is a moving target. As you adopt more products, employees consta...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs