Most voted "setinterval" questions
Method that creates a continuous timer that is repeated every specified period in milliseconds. Do not confuse with setTimeout.
Learn more…28 questions
Sort by count of
-
7
votes3
answers1160
viewsHow to set number of times the setInterval will be executed?
It is possible to control the number of executions of setInterval? I made a script very simple where I wanted to div flash 3x to alert the user. But in script that I made it keeps blinking straight.…
-
4
votes4
answers614
viewsWriting effect using javascript, setInterval does not work
I’m trying to use the setInterval function to write 1 letter every second, but it didn’t work: partText = ""; function escrever(text) { for (i = 0; i < text.length; i++) { partText +=…
-
3
votes1
answer1666
viewsLooping jquery setInterval
I’m doing a slider and I need that when the images finish passing, they start again but I’m not getting it. Someone could help? JS $(function(){ // Buttons Hover Effect buttonsHover(); function…
-
3
votes1
answer1759
viewsCan you make a type of "setInterval" in PHP?
To perform certain function in a time interval.
-
3
votes1
answer179
viewsProblems with setInterval
Next, my problem is like this, I’m making an Inbox, so I need to update every 5s the messages. So far so good. In the div that loads the messages I put the following script: function loadInbox1(id)…
-
3
votes0
answers49
viewsUse a timer function to create multiple animated balls
Hello, I am learning Javascript and would like to know how to create several animated balls. I thought of creating this function so I didn’t have to repeat the code for all the balls: const canvas =…
-
3
votes1
answer100
viewsAsync functions inside setInterval giving Syntax Error in HTML
Good morning/evening guys, I’m having a really boring problem, I’m creating a website for a school biology project, about cells. On this site I have to make a loop that performs an action, wait X…
-
2
votes2
answers54
viewsjQuery each - Clarification
I need every x seconds a li my menu is hidden and I have this code: $('.area-menu .close').click(function(){ delayed(); }); function delayed() { var liMenu = $('.area-menu li').not('.marginless');…
-
2
votes1
answer63
viewsInside setInterval, "this" does not point to the function that called it
The context in which this Arrow was created was directly in the method setInterval, however the this points to the idade inside the object Pessoa, why? The this in Arrow is based on the context in…
-
1
votes1
answer520
viewsDisplay image according to time by repeating javascript function
I am using this code to display two images on a given page: <!DOCTYPE html> <!DOCTYPE html> <html> <head> <style> #mapinha { position: relative; top: 0; left: 0; }…
-
1
votes1
answer1668
viewsHow to Interrupt setInterval in Javascript?
how do I interrupt the execution of a setInterval that is running on a module that I no longer need? I’m not talking about just catching the feedback from setInterval and execute a clearInterval.…
-
1
votes1
answer29
viewsMount a Strobe Light inside the JS canvas
I have a task to develop for college but I’m having some problems. First let me try to explain what to do: I need to simulate a strobe light based on a few colors in an HTML selector. The user…
-
1
votes1
answer259
viewsangular - How to replace setInterval?
I am currently doing a project and I need to get information from the bank that is updated and for this I am giving a get every 5 seconds using setInterval. But I know this isn’t the best of worlds,…
-
1
votes3
answers133
viewsIs it possible to leave the delay argument of the dynamic setInterval?
It is possible to pass the millisecond parameter in the function setInteval as a variable so that it can be changed dynamically or necessarily needs to be a static number? I did some tests but did…
-
1
votes0
answers40
viewsDifficulty in javascript with the return button of a rotary image banner
Hey, community, I’m new. I come to ask for help from more experienced people regarding the following problem: I want to make a banner of images on a site where images pass every 4 seconds, but there…
javascript function image classes setintervalasked 3 years, 10 months ago Angelo Schuler Piletti 23 -
0
votes2
answers351
viewsTiming with setInterval in JS
Guys I’m trying to make a timer, until it’s working the problem is that it only decreases the time if I keep clicking, and I need it to dimiua alone after I click once. var mins = "30"; var secs =…
-
0
votes0
answers601
viewsAutomatic update without refresh google maps
I work with a vehicle tracking system, but it was not developed by me, I caught the project already underway. I need that on my page where the whole tracking procedure is done as the current…
-
0
votes0
answers89
viewsDoes letting active setInterval slow down the site?
For example, I have a setInterval that will stay 1 in 1 second checking if the company chat is with any online attendant. If any attendant goes online, I give a clearInterval and stop the function,…
-
0
votes1
answer946
viewsUpdate a PHP variable within a Javascript function
I am using the following code to display the current server time: <p id="demo"></p> <script> function segundoAtual() { var n = <?php…
-
0
votes1
answer316
viewsProblems with the time interval on a carousel
Well, I’m having some problems with a self-made carousel, more specifically in the transition order of the items. var carouselBannerHolder = document.getElementById("banners-slider"); var…
-
0
votes1
answer59
viewsJavascript clock increment for game
I am creating a JS team to count the time it will take the user to complete the task. I am using setInterval() to run the team but I’m not able to increase to more than (1) the value of min(). This…
-
0
votes1
answer238
viewsHow to make a function run in real time
Hello, I’m making a player and would like to know if you have a function that runs full time, or only when such element changes In case I have that function function updateTime(){ var bufferedEnd =…
-
0
votes1
answer34
viewsMy setInterval function is not working as intended
Here’s the code: //Função para contar os segudos function conta_seg(){ sec++; if (sec < 10 && min == 0) { document.getElementById("conta-tempo").innerHTML = "00:0" + sec; }else if (sec…
-
0
votes0
answers55
viewsJavascript/jQuery - setInterval stopping execution of other Javascript functions
I’m facing a problem that’s driving me crazy already. It’s like this. I am capturing json data from an external server on cross-Omain, I need this data updated every 5 seconds. I was able to loop…
-
-1
votes1
answer44
viewsMap markers multiplying when use setInterval
I would like to understand why my map markings are multiplying when I use setInterval to update geolocation. <!DOCTYPE html> <!DOCTYPE html> <html lang="pt-BR"> <head>…
-
-1
votes1
answer62
viewsHow to stop an interval with clearInterval and continue it later?
I’m making a code to make a typing game: by typing the word correctly the user gains an extra time in the time being decreased and gains 1 point, and loses if he reaches 0s. For example: if you get…
-
-1
votes3
answers57
viewsConvert stopwatch to hh mm ss format
My stopwatch is running without format 00:00:00 I created a div in index.html <!-- TIMER --> <div class="container"> <span id="display">00:00:00</span> </div> No js…
-
-2
votes2
answers84
viewsHow do I create a time interval in the execution of a for?
How I create a 1 second interval in the execution of the for or of function? JavaScript: function Linha1() { for (var i1 = 0; i1 <= 3; i1++, Linha1.setInterval(1000)) { if (notas1[0][i1] == 1) {…