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

274
Views
JQuery slideToggle works on local, but not live site

I have a few different jQuery slideToggles on my site and I have no issue but the mobile navigation menu I can't seem to work. I have it working fine on my local site but on my live site nothing happens.

My live site is https://toolcurve.com

<ul class="menu">
    <li class="item"><a href="">Main menu link</a>
        <img src="drop-chev.svg" class="sub-menu-drop ">
        <ul class="dropdown">
            <li class="sub-item"><a href=""></a>Sub Menu Link</li>
            <li class="sub-item"><a href=""></a>Sub Menu Link</li>
        </ul>
    </li>
    <li class="item"><a href="">Main menu link</a>
    <img src="drop-chev.svg" class="sub-menu-drop ">
        <ul class="dropdown">
            <li class="sub-item"><a href=""></a>Sub Menu Link</li>
            <li class="sub-item"><a href=""></a>Sub Menu Link</li>
        </ul>
    </li>
</ul>

The JS I use is

$(function(){
        if (window.innerWidth < 768){
        var $submenu = $(".dropdown");
        $(".sub-menu-drop").on("click", function(e){
            $(this).next($submenu).slideToggle();
        });
        }
    });

This is very similar to the other slideToggles i have on my site which all work fine but I just seem to get this one to work on my live site, but it does work fine on my local site.

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

<img src="drop-chev.svg" class="sub-menu-drop "> //SPACE EXISTS
<img src="drop-chev.svg" class="sub-menu-drop"> //SPACE REMOVED

REMOVE EXTRA SPACE AT THE END FROM YOUR CLASS IN THE IMAGE TAG, THAT IS THE REASON IT IS NOT BEING TARGETED PROPERLY

about 4 years ago · Santiago Gelvez 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!