1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Function not executed at all

Discussion in 'jQuery' started by xms, Jan 29, 2018.

  1. #1
    I have a function called valvonta. I would like to run it every 6 secs. What is wrong here?

    var toista_valvonta;
    toista_valvonta = setTimeout(function() { valvonta }, 6000);
    
    (function valvonta() {
    alert('yes');
    })();
    Code (JavaScript):

    SEMrush
     
    xms, Jan 29, 2018 IP
    SEMrush
  2. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    5,851
    Likes Received:
    1,084
    Best Answers:
    22
    Trophy Points:
    400
    #2
    
    var toista_valvonta;
    function valvonta(){
    toista_valvonta = setTimeout(valvonta, 6000);
       alert('yes');
    }
    valvonta();
    
    Code (markup):
     
    qwikad.com, Jan 29, 2018 IP
    sarahk likes this.