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

91
Views
menu bar JavaScript and file level issue

I have created a responsive menu bar as show in attached images, it working fine in files level as below: enter image description here

https://airlineshq.com/airlines/malaysia/index.htm

when go further 1 level down,

enter image description here

https://airlineshq.com/airlines/malaysia/airasia/index.htm

the responsive menu bar still working but the search icon, hamburger 3 row bar and X bar never appear. I believe is due to file structure issue, anybody can assist to check?

help to check on the script below to identify whether any issue?


<div class="navbar" id="nav">
      <a href="https://airlineshq.com" class="active">Home</a>
     <a href="../../../passenger_guides/index.htm">Passenger Guides</a>
      <a href="../../../airlines/index.htm">Airlines Offices</a>
      <a href="../../../lounges/index.htm">Lounges</a>

      <form class="search-box" action="search.htm">
    <input type="text" placeholder="Search..">
    <button type="submit" class="search-icon"><i class="fa fa-search"></i></button>
    
  </form>
    
  <a href="javascript:void(0);" class="icon" onclick="myFunction()"><i class="fa fa-bars"></i></a>  
</div>
</div>

<script>
    function myFunction() {
      var x = document.getElementById("nav");
      
      console.log(barIcon)
      if (x.className === "navbar") {
        x.className += " responsive";
        var barIcon = document.getElementsByClassName('fa-bars')[0];
        barIcon.classList.add("fa-times");
        barIcon.classList.remove("fa-bars");
      } else {
        var closeIcon = document.getElementsByClassName('fa-times')[0];
        closeIcon.classList.remove("fa-times");
closeIcon.classList.add("fa-bars");
        x.className = "navbar";
      }
    }  
</script>   

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

0

One level down may not have the right path to fontawesome

Top level: <link type="text/css" rel="stylesheet" href="../fontawesome.ccs" />

Next Level <link type="text/css" rel="stylesheet" href="../../fontawesome.ccs" />

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!