Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

252
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda