Changed around line 1
+ document.getElementById('careerQuiz').addEventListener('submit', function(event) {
+ event.preventDefault();
+
+ const q1 = parseInt(document.getElementById('q1').value);
+ const q2 = parseInt(document.getElementById('q2').value);
+ const q3 = parseInt(document.getElementById('q3').value);
+
+ const totalScore = q1 + q2 + q3;
+
+ let resultText = '';
+ if (totalScore <= 6) {
+ resultText = 'Stay in your current job for now. Focus on building skills and savings before making the leap.';
+ } else if (totalScore <= 12) {
+ resultText = 'Consider a gradual transition. Start with AI content production as a side hustle.';
+ } else {
+ resultText = 'Go for it! You have the passion, stability, and resources to make the leap into AI content production.';
+ }
+
+ document.getElementById('resultText').textContent = resultText;
+ document.getElementById('quiz').classList.add('hidden');
+ document.getElementById('results').classList.remove('hidden');
+ });
+
+ document.getElementById('retakeQuiz').addEventListener('click', function() {
+ document.getElementById('quiz').classList.remove('hidden');
+ document.getElementById('results').classList.add('hidden');
+ });