First off create an ‘a’ tag with the link to the next page. Make sure you give it an id for the javascript part.
<a id="button" href="path_to/nextpage.html">Text for the button</a>
Do add basic CSS to it like position, width, and height. Set the opacity to 0 and pointer-events to none.
//other properties
opacity:0;
pointer-events:none;
//other properties
Once you have done this, just get a variable to point to the tag and add another setTimeout function which sets the opacity to 1 and pointer-events to all
var nextbtn = document.getElementById("button"); //or whatever id you gave the <a> tag
setTimeout(function() {
nextbtn.style.opacity = "1";
nextbtn.style.pointerEvents="auto"
}, 500);// you can change the delay to suit your requirements
I hope this clears your issue. Have a good day!
I have a issue with adding a button that should become visible after a Java script function is completed.
Code source:
"https://codepen.io/arcs/pen/rYXrNQ"
Note: code is not mine obviously and I take no any credit for this
Elaboration:
I moved this code to a simple html page, everything went fine.
Once the registry form is finished, text message will display with a small time delay.
What I would like to have here is, a button with timeout function (a bit longer than text message) under the text message, from where I can navigate the user to the next page.
Once again, when the entire process of this code is finished, text message will load.
I need a button to load below that text.
I need button to move user to the next page, so it should contain a link and open in same tab could be also added.
Any help with this would be highly appreciated.
You want to go to the first page again ? A button that appears under the final message, and takes you to the first page again ?
Thanks for your interest. No, I need button to move user to the next page, so it should contain a link and open in same tab could be also added.
Hi @ZohirSalak I was able to spot that, but I would appreciate if you could give me the entire line of an example, because I already added many variations and everything result as a failure.
that works too. I use opacity as I find it easier to manipulate. In another project of mine which invovled showing a div as a transition since i cannot transition between different gradients. I tried