Interaction: When clicked, change 'overflow' to 'visible'

Hey guys!

I’m trying to achieve the following interaction: When clicked, change ‘overflow’ to ‘visible’.

I have an element that has the property ‘overflow’ hidden. But I want it to change to ‘visible’ when I click on an element. I need custom js code for this. I’ve been looking online but can’t find the exact answer. (also, my js knowlegde is not a lot…)

Can someone help me?

Thank you!!

Here is my public share link:

Here the link to website:
Password: Kf^5kkX9Dk@F

Hey @Eva_Reussien, can you tell us which button is suppose to have that feature?

Otherwise, you can try something like this.

var container = $('.container');

$('.button').on('click', function(){
 if(container.css('overflow') == visible){
   container.css('overflow', 'hidden');
} else {
   container.css('overflow', 'visible');

1 Like

Thanks for the help!

1 Like