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

152
Views
¿Cómo puedo ocultar un div con cookies?

Quiero ocultar un div presionando un botón de envío que agregará una cookie al cliente. Lo he intentado de muchas maneras pero hasta el momento no he descubierto cómo puedo hacerlo. Aquí está mi JavaScript y HTML para probar. Código HTML + CSS:

 <div class="postulacion" id="formulario"> <span class="s_no foca">¿Estás interesado?</span> <span class="s_n"> ¡Rellene el siguiente formulario!</span> <div class="formulario"> <span class="recuerde"> <i class="fas fa-lock"></i> Recuerde que toda su información se encuentra encriptada. </span>

Código CSS:

 .formulario.hidden{ display: none !important; }

Código JavaScript:

 $.cookie('_dro', 'the_value'); // Create expiring cookie, 7 days from then: $.cookie('_dro', 'the_value', { expires: 7 }); // Read a cookie $.cookie('_dro'); // => 'the_value' $.cookie('not_existing'); // => null $("#form_send").click( $.cookie('_dro', 'the_value', { expires: 7 })); if (document.cookie.indexOf('_dro') > -1) { $('.formulario').addClass('hidden'); } else { $('.formulario').removeClass('hidden'); }
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!