Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

255
Vistas
How to make popup appears once weekly or monthly?

I created nice popup for my Facebook page, but I have problem that it is annoying. I put it to appear on scroll, and close on button, but I want to change it to appear once weekly or monthly. I never did codded anything similar and I just found few pretty confusing answers around. This is what I have:

jQuery(document).ready(function( $ ) {
  $('.clicky').on('click', function(){
      $(this).closest(".box").remove();
  });

  $(document).scroll(function() {
    var y = $(this).scrollTop();
    if (y > 200) {
      $('.box').fadeIn();
    } else {
      $('.box').fadeOut();
    }
  });
});
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
<script src="https://code.jquery.com/ui/1.13.0/jquery-ui.js"></script>

<div class="box">
  <div class="text">
    1. Like page..
    <br>
    <input type="submit" value="Facebook stranica"
    onclick="window.open('https://www.facebook.com/xxxxx')" >
    <br>
    2. Click i liked.
    <br>
    <input type="submit" value="i liked" class="clicky">
    <br>
  </div>
</div>

What is the most simple way to turn this to appear once weekly or monthly?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you want to resolve based on when the user last saw the popup then you should use "localstorage" or a database and insert code that stores the last time the popup was viewed and checks if the specified amount of time has elapsed each time the user accesses the page You should.

On the other hand, if you want to show a popup at a specific time you want, you just need to get the time you specified and the current time and compare it.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda