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

228
Views
I'm trying make plus minus expand collapse in mobile version it's working fine but in desktop view I will try to hide that but not working

I'm trying make plus/minus expand/collapse. In the mobile version it's working fine but in desktop view I will try to hide but it's not working; display: none is not working.

When I click the desktop version shows plus/minus sign, I need too hide from desktop.

jQuery(document).ready(function() {
  var windowWidth = jQuery(window).width();
  if (windowWidth <= 768)
    jQuery('.panel-collapse').removeClass('in');
    $(this).closest(".day-header").find(".plus,.minus").toggle();

  jQuery('.toggle-menu').click(function() {
    // get this data-target
    var target = $(this).data("target");
    $(target).toggleClass('in');
    $(this).closest(".day-header").find(".plus,.minus").toggle();
  });
  
  $(".minus,.plus").click(function() {
    $(this).hide();
  });
});
.toggle-menu {
  cursor: pointer;
}

.col .collapse.in {
  display: block;
}

.col .collapse {
  display: none;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<div class="col">
  <div class="day-header">
    <h4>
     <span class='plus' style='display:none;'>+</span>
     <span class='minus'>-</span>
    <a class="toggle-menu" data-target="#foot">Footwere</a>
   </h4>
  </div>
  <div id="foot" class="panel-collapse collapse in">
    <p>
      Show footwere
    </p>
  </div>
</div>

<div class="col">
  <div class="day-header">
    <h4><a class="toggle-menu" data-target="#cloth">cloths</a></h4>
  </div>
  <div id="cloth" class="panel-collapse collapse in">
    <p>
      Show cloth
    </p>
  </div>
</div>

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!