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 Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,719 views 17 21
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