Welcome to Your Travel Guide
Explore step-by-step instructions for your next adventure.
Step 1: Choose Your Destination
Description of the first step.
Conclusion
Final thoughts and tips.
body {
font-family: 'Roboto', sans-serif;
margin: 0;
padding: 0;
background-color: #f5f5f5;
}
header {
background-color: #6200ea;
color: white;
padding: 20px;
text-align: center;
}
nav a {
margin: 0 15px;
color: white;
text-decoration: none;
}
main {
padding: 20px;
}
.step {
background-color: white;
margin: 20px 0;
padding: 15px;
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
border-radius: 5px;
}
.step img {
max-width: 100%;
border-radius: 5px;
}
footer {
background-color: #6200ea;
color: white;
text-align: center;
padding: 10px;
}
document.addEventListener('DOMContentLoaded', function () {
const steps = document.querySelectorAll('.step');
let currentStep = 0;
function showStep(stepIndex) {
steps.forEach((step, index) => {
step.style.display = index === stepIndex ? 'block' : 'none';
});
}
document.querySelector('#next-step').addEventListener('click', function () {
if (currentStep < steps.length - 1) {
currentStep++;
showStep(currentStep);
}
});
document.querySelector('#prev-step').addEventListener('click', function () {
if (currentStep > 0) {
currentStep--;
showStep(currentStep);
}
});
showStep(currentStep);
});
Post a Comment