Merge pull request 'Creating FAQ Page' (#5) from arceus-patch-1 into main
Reviewed-on: #5
This commit was merged in pull request #5.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>FAQ Page</title>
|
||||
<style>
|
||||
/* Add your CSS styles here */
|
||||
.question {
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
}
|
||||
.answer {
|
||||
display: none;
|
||||
margin-left: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Frequently Asked Questions</h1>
|
||||
|
||||
<div class="faq-item">
|
||||
<div class="question">Question 1: What is Lorem Ipsum?</div>
|
||||
<div class="answer">Answer: Lorem Ipsum is simply dummy text of the printing and typesetting industry.</div>
|
||||
</div>
|
||||
|
||||
<div class="faq-item">
|
||||
<div class="question">Question 2: Why do we use it?</div>
|
||||
<div class="answer">Answer: It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</div>
|
||||
</div>
|
||||
|
||||
<!-- Add more FAQ items as needed -->
|
||||
|
||||
<script>
|
||||
// JavaScript to toggle the visibility of answers
|
||||
const questions = document.querySelectorAll('.question');
|
||||
|
||||
questions.forEach(question => {
|
||||
question.addEventListener('click', () => {
|
||||
const answer = question.nextElementSibling;
|
||||
answer.style.display = (answer.style.display === 'block') ? 'none' : 'block';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user