Why my javascript not working? Edited


I just want to ask for some help. I made a web item in my atlassian-plugin.xml:

 <web-item key="web-item-example" name="My Web Item" section="operations-delete" weight="200">
<description key="my-web-item-desc">General description</description>
<label>Push me</label>
<link linkId="my_web_item_link"/>

 And i wrote my js like this:


 When i press the web item happening nothing. Can you help me?


I dont know why my code is not working.

2 answers

1 accepted

I could not solve this problem with web-item, but if somebody needs help then use javascript and put a label into the more operationbar. My soultion is the next:

 $('#opsbar-operations_more_drop').append('<div class="aui-dropdown2-section"><ul><li class="aui-list-item"><a href="#" id="listDialog"><span class="trigger-label">PD rendering</span></a></li></ul></div>');

* Open your Web Developer tools in Chrome / Firefox. Do you see any errors / warnings?

* Maybe AJS.toInit() is not executing your code at the right time. You could try it with 


 Or with

$(window).on('load', function() { //do something})

It is already solved. If i push the button, then the link automaticly load the main page, so it can not call the functions before it. To solve this problem you should put in the link "#". In this case the fucntions will be called (i tried it with only button, not web item).

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,095 views 4 9
Read article

Atlassian User Groups

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!

Find my local user group

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

Groups near you