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

217
Views
How can I solve a delay problem during toggle initialization?

Good morning folks!

Currently I'm having a delay during initialization when I try to toggle one button to another. I'd like some help with that.

This is my code:

<a onclick="hidePlusIconBtn" data-toggle="collapse" href="#collapseSidebar"  aria- 
  expanded="false" aria-controls="collapseSidebar" style="position: relative; right: 
  1585px; top:80px; font-size: 50px;">
  <i id="plus_icon" onclick="hide_and_show()" class="mdi mdi-plus-circle"></i>
</a>
<a onclick="hidePlusIconBtn" data-toggle="collapse" href="#collapseSidebar"  aria- 
  expanded="false" aria-controls="collapseSidebar" style="position: relative; right: 
  1585px; top:80px; font-size: 50px;"><i id="close_icon" onclick="hide_and_show()" 
  class="mdi mdi-close-circle" style="display: none"></i>
</a>


<script>
    
        function hide_and_show() {

            if (plus_icon.style.display == "block") {
                document.getElementById("plus_icon").style.display="none"
                document.getElementById("close_icon").style.display="block"
            } else {
                document.getElementById("close_icon").style.display="none"
                document.getElementById("plus_icon").style.display="block"
            }
            
        }
         
    </script>

about 4 years ago · Juan Pablo Isaza
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!