Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,300,679
Community Members
 
Community Events
165
Community Groups

How can I hide/show content by click?

Hello everyone!
Is there any possibility where I can hide/show certain content by clicking an image attached to my page? 

2 answers

You'd have to use the HTML macro (assuming it's enabled on your instance) and add maybe some JavaScript or something else to get an image click to show/hide content.

There's no built-in feature for that except the aforementioned Expand macro, which is not an image.

Here's some code that uses the HTML macro and the aui (Atlassian user interface) classes to make a button show content. You'd need to alter it to make an image do the same thing.

<div class="aui-group">
<button data-aui-trigger aria-controls="my-button" class="aui-button aui-button-primary">
<span class="aui-icon aui-icon-small aui-iconfont-hipchat">View more details</span> Click me to see content
</button>
<aui-inline-dialog id="my-button">
<h1>Here's a header</h1>
<p>Here is some content.</p>
<p><span class="aui-icon aui-icon-small aui-iconfont-remove">X icon in a circle</span>You can even use Atlassian aui icons</p>
<h2>Here's a second header</h2>
<p>More content</p>
<p><span class="aui-icon aui-icon-small aui-iconfont-approve">Check mark</span>A check mark</p>
<h3>Header 3</h3>
<p>You get the idea</p>
<p align=right><span class="aui-icon aui-icon-small aui-iconfont-info">Info</span> <em>Click outside this pop-up to close it</em></p>
</aui-inline-dialog>
</div>

 

Srinatha T Atlassian Team May 26, 2022

Bingo! the requirement was to click on image . Thanks for the inputs @WW . 

Like WW likes this
0 votes
Srinatha T Atlassian Team May 26, 2022

Hi @Itai Aharon ,

Welcome to Atlassian community. 

You can hide or show content by using the Expand macro.

Basically it will hide the content inside it and let you expand or close . I hope this is what you are looking at ?

Have a good day!

Thanks,

Srinath T

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

376 views 2 11
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you