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

117
Views
jscookie show/hide content with jquery display block-none not worked

Need show-hide content and set cookie, and read cookie - if=1 show, if=0 hide my content) ACCORDION with jsCOOKIE CONTENT not worked ) hard math for me pls helps, i thinks its easy.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
 <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.1/js.cookie.min.js" type="text/javascript"></script>

jQuery(document).ready(function(){

  var cookie = Cookies.get('activePanelGroup');
   $("#hideshow").click(function(){

    if(cookie == 1){
       $('#content').show();
       Cookies.remove('activePanelGroup');
       Cookies.set('activePanelGroup', '0', {expires:7});
    }
    if(cookie == 0){
       $('#content').hide();
       Cookies.remove('activePanelGroup');
       Cookies.set('activePanelGroup', '0', {expires:7});
    }
    console.log(Cookies.get('activePanelGroup')); 
    cookie = 1;
   });

 <div id="hideshow">THIS HIDE SHOW BUTTON</div>

 <div id="content">ACCORDION COOKIE CONTENT<BR>CONTENT</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!