Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

375
Views
How to hide MULTIPLE sections and show only one section in Elementor with a button (NOT Accordion)?

I have multiple sections in Elementor with IDs #section1, #section2, #section3 and so on... I created buttons and each button functionality should be to show only one section and hide ALL others. I can do that only for 1 section and 1 button with JS, but it seems I am not successful with multiple sections. I need to do that without refreshing the page. Any ideas?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Am not sure if this is what you want but seems to work for me

enter code here

`enter code here`</div>
`enter code here`<div id="section2">

`enter code here`</div>

`enter code here`<button class="section1">button1</button>
`enter code here`<button class="secss">button2</button>

use your own styling

the javascript enter code here"use strict";

enter code hereconst btn1 = document.querySelector(".section1"); enter code hereconst btn2 = document.querySelector(".secss");

enter code hereconst section1 = document.getElementById("section1"); enter code hereconst section2 = document.getElementById("section2");

enter code herebtn1.addEventListener("click", function() { enter code heresection1.classList.add("hidden"); enter code here});

enter code herebtn2.addEventListener("click", function() { enter code heresection1.classList.remove("hidden"); enter code heresection2.classList.add("hidden"); enter code here});

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!