How to use JQuery with an HTML Macro in Confluence


I've this page and I want to use it in confluence. I saw some links but still not sure what exactly I need to do. I've already enabled HTML macro.


<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
th {
border-bottom: 1px solid #d6d6d6;

tr:nth-child(even) {
background: #e9e9e9;

<div data-role="page" id="pageone">
<div data-role="header">
<h1>Filterable Tables</h1>

<div data-role="main" class="ui-content">
<input id="filterTable-input" data-type="search" placeholder="Search For Customers...">
<table data-role="table" data-mode="columntoggle" class="ui-responsive ui-shadow" id="myTable" data-filter="true" data-input="#filterTable-input">
<th data-priority="6">CustomerID</th>
<th data-priority="1">ContactName</th>
<th data-priority="2">Address</th>
<th data-priority="3">City</th>
<th data-priority="4">PostalCode</th>
<th data-priority="5">Country</th>
<td>Alfreds Futterkiste</td>
<td>Maria Anders</td>
<td>Obere Str. 57</td>
<td>Antonio Moreno Taquería</td>
<td>Antonio Moreno</td>
<td>Mataderos 2312</td>
<td>México D.F.</td>
<td>Around the Horn</td>
<td>Thomas Hardy</td>
<td>120 Hanover Sq.</td>
<td>WA1 1DP</td>
<td>Berglunds snabbköp</td>
<td>Christina Berglund</td>
<td>Berguvsvägen 8</td>
<td>S-958 22</td>


<div data-role="footer">
<h1>Footer Text</h1>



2 answers

This widget could not be displayed.

Yes. I'm using Html Macro. And I'm able to embed a javascript. But not able to use JQuery. The above code work fine as a standalone html page. It does show up within confluence/html macro. But Search and Filter doesn't work.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Tuesday in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

141 views 12 6
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