Im new/noob to coding, I would just like to ask how can you make a tab proceed on the next tab once the user click next/save? and would it be possible to change the color of the finished tab? for ex. all the finished tab will be green while the current/unfinished will be yellow and the unopened is gray. please help, i cant not get pass this task huhu thank you so much in advance
<script>
function openCity(evt, cityName) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(cityName).style.display = "block";
evt.currentTarget.className += " active";
}
// Get the element with id="defaultOpen" and click on it
document.getElementById("defaultOpen").click();
</script>
New contributor
Rxina is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.