Shopify themes, liquid, logos, and UX
I want the collapsible rows to open in a smooth transition instead of all at once in a snappy manner. I am using Trade 15.0.0.
Store link: kissaten.in
Hi,
Need to modify CSS and JavaScript
Add Smooth Transition in CSS and modify JavaScript for Smooth Transition
Example code css
.collapsible-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.5s ease-out;
}
.collapsible-content.open {
max-height: 500px; /* Adjust this value according to your content height */
}
Example code javascript
document.addEventListener('DOMContentLoaded', function() {
var collapsibleTriggers = document.querySelectorAll('.collapsible-trigger');
collapsibleTriggers.forEach(function(trigger) {
trigger.addEventListener('click', function() {
var content = trigger.nextElementSibling;
if (content.classList.contains('open')) {
content.classList.remove('open');
} else {
content.classList.add('open');
}
});
});
});
Which files to add the code to?
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025