const prevBtns = document.querySelectorAll(".btn-prev");
const nextBtns = document.querySelectorAll(".btn-next");
const progress = document.getElementById("progress");
const formSteps = document.querySelectorAll(".form-step");
const progressSteps = document.querySelectorAll(".progress-step");
let formStepsNum = 0;
nextBtns.forEach((btn) => {
btn.addEventListener("click", () => {
formStepsNum++;
updateFormSteps();
updateProgressbar();
});
});
prevBtns.forEach((btn) => {
btn.addEventListener("click", () => {
formStepsNum--;
updateFormSteps();
updateProgressbar();
});
});
function updateFormSteps() {
formSteps.forEach((formStep) => {
formStep.classList.contains("form-step-active") &&
formStep.classList.remove("form-step-active");
});
formSteps[formStepsNum].classList.add("form-step-active");
}
function updateProgressbar() {
progressSteps.forEach((progressStep, idx) => {
if (idx < formStepsNum + 1) {
progressStep.classList.add("progress-step-active");
} else {
progressStep.classList.remove("progress-step-active");
}
});
const progressActive = document.querySelectorAll(".progress-step-active");
progress.style.width =
((progressActive.length - 1) / (progressSteps.length - 1)) * 100 + "%";
}| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| .DS_Store | File | 10 KB | 0644 |
|
| aos.js | File | 13.91 KB | 0644 |
|
| bootstrap-datepicker.min.js | File | 33.37 KB | 0644 |
|
| bootstrap.bundle.min.js | File | 76.3 KB | 0644 |
|
| bootstrap.min.js | File | 56.71 KB | 0644 |
|
| costscalculate.js | File | 1.31 KB | 0644 |
|
| isotope.pkgd.min.js | File | 34.61 KB | 0644 |
|
| jquery-3.3.1.min.js | File | 84.89 KB | 0644 |
|
| jquery-migrate-3.0.1.min.js | File | 11.15 KB | 0644 |
|
| jquery-ui.js | File | 44.73 KB | 0644 |
|
| jquery.countdown.min.js | File | 5.21 KB | 0644 |
|
| jquery.easing.1.3.js | File | 7.92 KB | 0644 |
|
| jquery.fancybox.min.js | File | 66.6 KB | 0644 |
|
| jquery.magnific-popup.min.js | File | 19.74 KB | 0644 |
|
| jquery.stellar.min.js | File | 12.3 KB | 0644 |
|
| jquery.sticky.js | File | 9.85 KB | 0644 |
|
| main.js | File | 12.38 KB | 0644 |
|
| mediaelement-and-player.min.js | File | 148.9 KB | 0644 |
|
| owl.carousel.min.js | File | 41.76 KB | 0644 |
|
| popper.min.js | File | 19.86 KB | 0644 |
|
| res.html | File | 209 B | 0644 |
|
| slick.min.js | File | 41.86 KB | 0644 |
|
| typed.js | File | 11.42 KB | 0644 |
|