Fix FAQ expanders and quote form JavaScript
- Fix FAQ accordion: change from display:none to max-height animation - Add .active class selectors alongside [aria-expanded="true"] - Fix quote.php: add missing closing brackets for event listeners - Fix Promise chain indentation in quote form submission 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2543,7 +2543,8 @@ a:focus-visible {
|
|||||||
transform: translateX(5px);
|
transform: translateX(5px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.faq-question[aria-expanded="true"] {
|
.faq-question[aria-expanded="true"],
|
||||||
|
.faq-question.active {
|
||||||
background: #179e83;
|
background: #179e83;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
@@ -2554,19 +2555,27 @@ a:focus-visible {
|
|||||||
transition: transform 0.3s ease;
|
transition: transform 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.faq-question[aria-expanded="true"] .faq-icon {
|
.faq-question[aria-expanded="true"] .faq-icon,
|
||||||
transform: rotate(45deg);
|
.faq-question.active .faq-icon {
|
||||||
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.faq-answer {
|
.faq-answer {
|
||||||
display: none;
|
|
||||||
background: white;
|
background: white;
|
||||||
padding: 20px;
|
padding: 0 20px;
|
||||||
|
max-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
transition: max-height 0.3s ease, padding 0.3s ease;
|
||||||
border-radius: 0 0 8px 8px;
|
border-radius: 0 0 8px 8px;
|
||||||
border-top: 1px solid #e1e5e9;
|
border-top: 1px solid #e1e5e9;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.faq-answer.active {
|
||||||
|
padding: 20px;
|
||||||
|
max-height: 1000px;
|
||||||
|
}
|
||||||
|
|
||||||
.faq-answer p {
|
.faq-answer p {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|||||||
16
quote.php
16
quote.php
@@ -966,13 +966,15 @@ $breadcrumbs = [
|
|||||||
showMessage('error', 'There was a problem with your submission:', errorMessages);
|
showMessage('error', 'There was a problem with your submission:', errorMessages);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
showMessage('error', 'Connection Error', 'There was an error sending your quote request. Please check your internet connection and try again, or contact us directly at info@ukdataservices.co.uk');
|
showMessage('error', 'Connection Error', 'There was an error sending your quote request. Please check your internet connection and try again, or contact us directly at info@ukdataservices.co.uk');
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
submitButton.textContent = originalText;
|
submitButton.textContent = originalText;
|
||||||
submitButton.disabled = false;
|
submitButton.disabled = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user