Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ // Mobile menu toggle
+ const menuToggle = document.querySelector('.menu-toggle');
+ const navLinks = document.querySelector('.nav-links');
+
+ menuToggle.addEventListener('click', () => {
+ navLinks.classList.toggle('active');
+ });
+
+ // Quiz functionality
+ const questions = [
+ {
+ question: "What's your primary motivation for considering an MBA?",
+ answers: [
+ "Career advancement in current field",
+ "Career switch to new industry",
+ "Starting own business",
+ "Salary increase",
+ ]
+ },
+ {
+ question: "How many years of work experience do you have?",
+ answers: [
+ "Less than 2 years",
+ "2-5 years",
+ "5-10 years",
+ "More than 10 years",
+ ]
+ },
+ {
+ question: "What's your current savings situation?",
+ answers: [
+ "Substantial savings/funding available",
+ "Some savings, will need loans",
+ "Limited savings, heavy reliance on loans",
+ "No savings, need full financial aid",
+ ]
+ },
+ {
+ question: "Are you willing to take a 2-year career break?",
+ answers: [
+ "Yes, definitely",
+ "Prefer 1-year program",
+ "Only part-time/online",
+ "Not sure",
+ ]
+ }
+ ];
+
+ let currentQuestion = 0;
+ const questionContainer = document.getElementById('question-container');
+ const resultContainer = document.getElementById('result-container');
+ const questionEl = document.querySelector('.question');
+ const answersEl = document.querySelector('.answers');
+ const progressEl = document.querySelector('.progress');
+
+ function showQuestion() {
+ const question = questions[currentQuestion];
+ questionEl.textContent = question.question;
+ answersEl.innerHTML = '';
+
+ question.answers.forEach(answer => {
+ const button = document.createElement('button');
+ button.textContent = answer;
+ button.classList.add('answer-btn');
+ button.addEventListener('click', () => selectAnswer(answer));
+ answersEl.appendChild(button);
+ });
+
+ progressEl.style.width = `${(currentQuestion / questions.length) * 100}%`;
+ }
+
+ function selectAnswer(answer) {
+ currentQuestion++;
+
+ if (currentQuestion < questions.length) {
+ showQuestion();
+ } else {
+ showResult();
+ }
+ }
+
+ function showResult() {
+ questionContainer.style.display = 'none';
+ resultContainer.classList.remove('hidden');
+
+ const resultContent = document.querySelector('.result-content');
+ resultContent.innerHTML = `
+
Based on your responses, here's our assessment:
+
Your profile shows strong potential for MBA success+
Consider researching schools that match your goals+
Evaluate financial planning options+
Start GMAT/GRE preparation if you decide to proceed+
+ `;
+ }
+
+ document.querySelector('.restart-btn').addEventListener('click', () => {
+ currentQuestion = 0;
+ questionContainer.style.display = 'block';
+ resultContainer.classList.add('hidden');
+ showQuestion();
+ });
+
+ showQuestion();
+ });
+
+ // Smooth scrolling for anchor links
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
+ anchor.addEventListener('click', function (e) {
+ e.preventDefault();
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
+ behavior: 'smooth'
+ });
+ });
+ });