How to import jQuery dynamically into Jira Plugin? (specifically, the Sticky Table Header jquery)

Hey guys, I'm still fairly new to plugin development and this is my first time using jQuery.

I am trying to use the Accessible Sticky Table Header Plugin - jQuery stickyTableHeader (located here: in my jira plugin, but I'm having trouble with it.

I followed the steps starting from step 2, but it is not working. In the view.vm file, I included the following code (except without the first line of code because I heard jquery is included in jira?):

<script src="//"></script>
<script src="jquery.stickyTableHeader.js"></script>

In step 3, it told me to wrap the html table into a div container. They had <div class="table-container">, but I had <div class="table-wrap">. I don't know if this would make a difference or not

Step 4 told me to initialize the plugin, though I was a bit confused with what it meant by that. All it did was provide this code:


I copied it and made some changes to it so that it'd match whatever class I had put down for the <div> tag. I even tried changing the class of the <div> tag so that it would match the steps. No luck. It just showed up as plain text on my plugin page. I don't know if it might have been because I copied it into the first 2-3 lines of my code. Should it be placed at the end?

After that didn't work, I tried copying that jquery.stickyTableHeader.js file into the js folder of my plugin, and then edited the web-resources section of the atlassian-plugin.xml file to include it, but I received an error upon compiling.

I hope you guys can help me out a bit with this, thanks!

0 answers

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,754 views 11 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot