Setup Faq in the website post

Chandran
0

FAQ

FAQ (Frequently Asked Questions) என்à®±ால், அடிக்கடி கேட்கப்படுà®®் கேள்விகள் என்à®±ு பொà®°ுள். இது à®’à®°ு குà®±ிப்பிட்ட பொà®°ுள் அல்லது சேவையைப் பற்à®±ிய à®®ுக்கியமான கேள்விகள் மற்à®±ுà®®் அவற்à®±ின் பதில்களை வழங்குà®®் à®’à®°ு பகுதியில் இடம் பெà®±ுகிறது.


இது பயனர்களின் சந்தேகங்களைத் தீà®°்க்கவுà®®், தேவையான தகவல்களை எளிதில் à®…à®±ியவுà®®் உதவுகிறது. FAQ பகுதி, குà®±ிப்பாக இணையதளங்களில் அல்லது சேவைகளில், பயனர்களின் நேரத்தை à®®ிச்சப்படுத்துà®®் à®’à®°ு சிறந்த வழி.


code for use

CSS Code

.faq-section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

h2 {
    text-align: center;
    color: #333;
}

.faq-item {
    margin-bottom: 15px;
}

.faq-question {
    cursor: pointer;
    background-color: #007BFF;
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin: 0;
}

.faq-answer {
    display: none;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}
 
HTML

<div class="faq-section">
        <h2>Frequently Asked Questions</h2>
        
        <div class="faq-item">
            <h3 class="faq-question">Questions 1</h3>
            <div class="faq-answer">
                <p>Answer </p>
            </div>
        </div>

        <div class="faq-item">
            <h3 class="faq-question">Questions </h3>
            <div class="faq-answer">
                <p>Answer </p>
            </div>
        </div>

        <div class="faq-item">
            <h3 class="faq-question">Questions 3</h3>
            <div class="faq-answer">
                <p>Answer</p>
            </div>
        </div>

    </div>
 
Script

document.addEventListener('DOMContentLoaded', function() {
    const questions = document.querySelectorAll('.faq-question');

    questions.forEach(function(question) {
        question.addEventListener('click', function() {
            const answer = this.nextElementSibling;

            if (answer.style.display === 'block') {
                answer.style.display = 'none';
            } else {
                answer.style.display = 'block';
            }
        });
    });
});
 

Preview Code 👇

Frequently Asked Questions

What is your return policy?

Our return policy allows returns within 30 days of purchase with a valid receipt.

How do I track my order?

You can track your order using the tracking number provided in your email confirmation.

Do you offer international shipping?

Yes, we offer international shipping to most countries. Shipping fees vary based on location.

Post a Comment

0Comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Ok, Go it!
To Top