Because my dynamic title is not displayed correctly?
I have a question about my JS test code. I need it to show each interval of 1500 the next character, but for some reason I do not see where they are automatically multiplied, until the browser is bugged. I share the code here:
<title>Minuevotitulodeprueba</title>
<script type="text/javascript">
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if(i>LegitTitle.length)
i = 0;
setInterval('ChangeTitle()',1500);
}
ChangeTitle()
</script>
I am a new developer I beg for mercy xdd
javascript title
add a comment |
I have a question about my JS test code. I need it to show each interval of 1500 the next character, but for some reason I do not see where they are automatically multiplied, until the browser is bugged. I share the code here:
<title>Minuevotitulodeprueba</title>
<script type="text/javascript">
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if(i>LegitTitle.length)
i = 0;
setInterval('ChangeTitle()',1500);
}
ChangeTitle()
</script>
I am a new developer I beg for mercy xdd
javascript title
issue with your code is you used setInterval when you should have use setTimeout.
– epascarello
Nov 12 at 14:43
add a comment |
I have a question about my JS test code. I need it to show each interval of 1500 the next character, but for some reason I do not see where they are automatically multiplied, until the browser is bugged. I share the code here:
<title>Minuevotitulodeprueba</title>
<script type="text/javascript">
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if(i>LegitTitle.length)
i = 0;
setInterval('ChangeTitle()',1500);
}
ChangeTitle()
</script>
I am a new developer I beg for mercy xdd
javascript title
I have a question about my JS test code. I need it to show each interval of 1500 the next character, but for some reason I do not see where they are automatically multiplied, until the browser is bugged. I share the code here:
<title>Minuevotitulodeprueba</title>
<script type="text/javascript">
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if(i>LegitTitle.length)
i = 0;
setInterval('ChangeTitle()',1500);
}
ChangeTitle()
</script>
I am a new developer I beg for mercy xdd
javascript title
javascript title
asked Nov 12 at 14:22
McGyver
33
33
issue with your code is you used setInterval when you should have use setTimeout.
– epascarello
Nov 12 at 14:43
add a comment |
issue with your code is you used setInterval when you should have use setTimeout.
– epascarello
Nov 12 at 14:43
issue with your code is you used setInterval when you should have use setTimeout.
– epascarello
Nov 12 at 14:43
issue with your code is you used setInterval when you should have use setTimeout.
– epascarello
Nov 12 at 14:43
add a comment |
3 Answers
3
active
oldest
votes
There are two issues with your code
- The first parameter to the
setInterval
function shouldn't be a string, but a function -->setInterval(ChangeTitle,1500);
. It would work though with the string (expression) version, but that is not recommended. - You shouldn't use the
setInterval
inside a function that itself is called itself in thesetInterval
unless you know what you are doing
Put it outside of the function ...
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
}
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
... or alternatively use setTimeout
instead of setInterval
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
setTimeout(ChangeTitle, 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
I was a bit surprised too, but the string actually worked too when i tried it.
– Mark Baijens
Nov 12 at 14:34
1
Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
– HerrSerker
Nov 12 at 14:36
Amen to that :)
– Mark Baijens
Nov 12 at 14:37
Without a doubt you solved my doubts! Thanks dude
– McGyver
Nov 12 at 14:47
add a comment |
Only issue you had is you used setInterval instead of setTimeout... Simple swap and the code works fine.
var i = 1;
var LegitTitle = document.title;
function ChangeTitle() {
document.title = LegitTitle.substring(0, i);
console.log(document.title)
i++;
if (i > LegitTitle.length)
i = 0;
setTimeout('ChangeTitle()', 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
add a comment |
You set a new interval each time you call the function, but the iteration calls the function on an interval not a timeout. Therefore you can avoid this problem by declaring the iteration outside of the function call.
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
if(i>LegitTitle.length) {
i = 0;
}
console.log('i = ' + i);
console.log('Title = ' + document.title);
i++;
}
ChangeTitle();
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
– McGyver
Nov 12 at 14:41
@McGyver please accept the best answer so people will see that your problem is solved.
– Mark Baijens
Nov 12 at 15:03
You can do a normal function call onwindow.onload
to change the title immediately.
– Mark Baijens
Nov 12 at 15:07
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53264157%2fbecause-my-dynamic-title-is-not-displayed-correctly%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
There are two issues with your code
- The first parameter to the
setInterval
function shouldn't be a string, but a function -->setInterval(ChangeTitle,1500);
. It would work though with the string (expression) version, but that is not recommended. - You shouldn't use the
setInterval
inside a function that itself is called itself in thesetInterval
unless you know what you are doing
Put it outside of the function ...
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
}
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
... or alternatively use setTimeout
instead of setInterval
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
setTimeout(ChangeTitle, 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
I was a bit surprised too, but the string actually worked too when i tried it.
– Mark Baijens
Nov 12 at 14:34
1
Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
– HerrSerker
Nov 12 at 14:36
Amen to that :)
– Mark Baijens
Nov 12 at 14:37
Without a doubt you solved my doubts! Thanks dude
– McGyver
Nov 12 at 14:47
add a comment |
There are two issues with your code
- The first parameter to the
setInterval
function shouldn't be a string, but a function -->setInterval(ChangeTitle,1500);
. It would work though with the string (expression) version, but that is not recommended. - You shouldn't use the
setInterval
inside a function that itself is called itself in thesetInterval
unless you know what you are doing
Put it outside of the function ...
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
}
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
... or alternatively use setTimeout
instead of setInterval
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
setTimeout(ChangeTitle, 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
I was a bit surprised too, but the string actually worked too when i tried it.
– Mark Baijens
Nov 12 at 14:34
1
Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
– HerrSerker
Nov 12 at 14:36
Amen to that :)
– Mark Baijens
Nov 12 at 14:37
Without a doubt you solved my doubts! Thanks dude
– McGyver
Nov 12 at 14:47
add a comment |
There are two issues with your code
- The first parameter to the
setInterval
function shouldn't be a string, but a function -->setInterval(ChangeTitle,1500);
. It would work though with the string (expression) version, but that is not recommended. - You shouldn't use the
setInterval
inside a function that itself is called itself in thesetInterval
unless you know what you are doing
Put it outside of the function ...
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
}
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
... or alternatively use setTimeout
instead of setInterval
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
setTimeout(ChangeTitle, 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
There are two issues with your code
- The first parameter to the
setInterval
function shouldn't be a string, but a function -->setInterval(ChangeTitle,1500);
. It would work though with the string (expression) version, but that is not recommended. - You shouldn't use the
setInterval
inside a function that itself is called itself in thesetInterval
unless you know what you are doing
Put it outside of the function ...
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
}
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
... or alternatively use setTimeout
instead of setInterval
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
setTimeout(ChangeTitle, 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
}
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
}
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
setTimeout(ChangeTitle, 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
var i = 1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
i++;
if (i > LegitTitle.length) {
i = 0;
}
console.log(document.title)
setTimeout(ChangeTitle, 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
edited Nov 12 at 15:31
answered Nov 12 at 14:28
HerrSerker
19.8k84778
19.8k84778
I was a bit surprised too, but the string actually worked too when i tried it.
– Mark Baijens
Nov 12 at 14:34
1
Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
– HerrSerker
Nov 12 at 14:36
Amen to that :)
– Mark Baijens
Nov 12 at 14:37
Without a doubt you solved my doubts! Thanks dude
– McGyver
Nov 12 at 14:47
add a comment |
I was a bit surprised too, but the string actually worked too when i tried it.
– Mark Baijens
Nov 12 at 14:34
1
Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
– HerrSerker
Nov 12 at 14:36
Amen to that :)
– Mark Baijens
Nov 12 at 14:37
Without a doubt you solved my doubts! Thanks dude
– McGyver
Nov 12 at 14:47
I was a bit surprised too, but the string actually worked too when i tried it.
– Mark Baijens
Nov 12 at 14:34
I was a bit surprised too, but the string actually worked too when i tried it.
– Mark Baijens
Nov 12 at 14:34
1
1
Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
– HerrSerker
Nov 12 at 14:36
Oh yeah, you can have an expression string which will be evaluated, but that should be avoided since eval ist evil
– HerrSerker
Nov 12 at 14:36
Amen to that :)
– Mark Baijens
Nov 12 at 14:37
Amen to that :)
– Mark Baijens
Nov 12 at 14:37
Without a doubt you solved my doubts! Thanks dude
– McGyver
Nov 12 at 14:47
Without a doubt you solved my doubts! Thanks dude
– McGyver
Nov 12 at 14:47
add a comment |
Only issue you had is you used setInterval instead of setTimeout... Simple swap and the code works fine.
var i = 1;
var LegitTitle = document.title;
function ChangeTitle() {
document.title = LegitTitle.substring(0, i);
console.log(document.title)
i++;
if (i > LegitTitle.length)
i = 0;
setTimeout('ChangeTitle()', 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
add a comment |
Only issue you had is you used setInterval instead of setTimeout... Simple swap and the code works fine.
var i = 1;
var LegitTitle = document.title;
function ChangeTitle() {
document.title = LegitTitle.substring(0, i);
console.log(document.title)
i++;
if (i > LegitTitle.length)
i = 0;
setTimeout('ChangeTitle()', 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
add a comment |
Only issue you had is you used setInterval instead of setTimeout... Simple swap and the code works fine.
var i = 1;
var LegitTitle = document.title;
function ChangeTitle() {
document.title = LegitTitle.substring(0, i);
console.log(document.title)
i++;
if (i > LegitTitle.length)
i = 0;
setTimeout('ChangeTitle()', 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
Only issue you had is you used setInterval instead of setTimeout... Simple swap and the code works fine.
var i = 1;
var LegitTitle = document.title;
function ChangeTitle() {
document.title = LegitTitle.substring(0, i);
console.log(document.title)
i++;
if (i > LegitTitle.length)
i = 0;
setTimeout('ChangeTitle()', 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
var i = 1;
var LegitTitle = document.title;
function ChangeTitle() {
document.title = LegitTitle.substring(0, i);
console.log(document.title)
i++;
if (i > LegitTitle.length)
i = 0;
setTimeout('ChangeTitle()', 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
var i = 1;
var LegitTitle = document.title;
function ChangeTitle() {
document.title = LegitTitle.substring(0, i);
console.log(document.title)
i++;
if (i > LegitTitle.length)
i = 0;
setTimeout('ChangeTitle()', 1500);
}
ChangeTitle()
<title>Minuevotitulodeprueba</title>
answered Nov 12 at 14:46
epascarello
151k13131179
151k13131179
add a comment |
add a comment |
You set a new interval each time you call the function, but the iteration calls the function on an interval not a timeout. Therefore you can avoid this problem by declaring the iteration outside of the function call.
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
if(i>LegitTitle.length) {
i = 0;
}
console.log('i = ' + i);
console.log('Title = ' + document.title);
i++;
}
ChangeTitle();
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
– McGyver
Nov 12 at 14:41
@McGyver please accept the best answer so people will see that your problem is solved.
– Mark Baijens
Nov 12 at 15:03
You can do a normal function call onwindow.onload
to change the title immediately.
– Mark Baijens
Nov 12 at 15:07
add a comment |
You set a new interval each time you call the function, but the iteration calls the function on an interval not a timeout. Therefore you can avoid this problem by declaring the iteration outside of the function call.
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
if(i>LegitTitle.length) {
i = 0;
}
console.log('i = ' + i);
console.log('Title = ' + document.title);
i++;
}
ChangeTitle();
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
– McGyver
Nov 12 at 14:41
@McGyver please accept the best answer so people will see that your problem is solved.
– Mark Baijens
Nov 12 at 15:03
You can do a normal function call onwindow.onload
to change the title immediately.
– Mark Baijens
Nov 12 at 15:07
add a comment |
You set a new interval each time you call the function, but the iteration calls the function on an interval not a timeout. Therefore you can avoid this problem by declaring the iteration outside of the function call.
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
if(i>LegitTitle.length) {
i = 0;
}
console.log('i = ' + i);
console.log('Title = ' + document.title);
i++;
}
ChangeTitle();
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
You set a new interval each time you call the function, but the iteration calls the function on an interval not a timeout. Therefore you can avoid this problem by declaring the iteration outside of the function call.
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
if(i>LegitTitle.length) {
i = 0;
}
console.log('i = ' + i);
console.log('Title = ' + document.title);
i++;
}
ChangeTitle();
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
if(i>LegitTitle.length) {
i = 0;
}
console.log('i = ' + i);
console.log('Title = ' + document.title);
i++;
}
ChangeTitle();
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
var i=1;
var LegitTitle = document.title;
function ChangeTitle(){
document.title = LegitTitle.substring(0,i);
if(i>LegitTitle.length) {
i = 0;
}
console.log('i = ' + i);
console.log('Title = ' + document.title);
i++;
}
ChangeTitle();
setInterval(ChangeTitle,1500);
<title>Minuevotitulodeprueba</title>
edited Nov 12 at 15:05
answered Nov 12 at 14:29
Mark Baijens
6,637103252
6,637103252
That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
– McGyver
Nov 12 at 14:41
@McGyver please accept the best answer so people will see that your problem is solved.
– Mark Baijens
Nov 12 at 15:03
You can do a normal function call onwindow.onload
to change the title immediately.
– Mark Baijens
Nov 12 at 15:07
add a comment |
That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
– McGyver
Nov 12 at 14:41
@McGyver please accept the best answer so people will see that your problem is solved.
– Mark Baijens
Nov 12 at 15:03
You can do a normal function call onwindow.onload
to change the title immediately.
– Mark Baijens
Nov 12 at 15:07
That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
– McGyver
Nov 12 at 14:41
That worked for me, but not exactly as I wanted, it shows the full title at the beginning. Just modify the position of the "i" and it seems to be displayed correctly, thank you very much experts!
– McGyver
Nov 12 at 14:41
@McGyver please accept the best answer so people will see that your problem is solved.
– Mark Baijens
Nov 12 at 15:03
@McGyver please accept the best answer so people will see that your problem is solved.
– Mark Baijens
Nov 12 at 15:03
You can do a normal function call on
window.onload
to change the title immediately.– Mark Baijens
Nov 12 at 15:07
You can do a normal function call on
window.onload
to change the title immediately.– Mark Baijens
Nov 12 at 15:07
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53264157%2fbecause-my-dynamic-title-is-not-displayed-correctly%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
issue with your code is you used setInterval when you should have use setTimeout.
– epascarello
Nov 12 at 14:43