All things Shopify and commerce
I'm trying to get the product description tab to stay open by default when you view the product. I've seen other older posts about this and the code didn't work. Please let me know how to make this happen if you have an idea! Thanks!
Site is shopaiti.com
Hey @ashleerae
Your website is password protected, can you share the password as well?
Best Regards,
Moeed
lilgoldgal5
Hey @ashleerae
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
<script>
document.addEventListener('DOMContentLoaded', function() {
var descriptionButton = document.querySelector('[aria-controls="Product-content-description10464607961110"]');
var descriptionContent = document.getElementById('Product-content-description10464607961110');
if (descriptionButton && descriptionContent) {
descriptionButton.setAttribute('aria-expanded', 'true');
descriptionButton.classList.add('is-open');
descriptionContent.classList.add('is-open');
descriptionContent.style.height = 'auto';
}
});
</script>
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Thanks! It looks like it's just working for the Pearl Huggie but when I go to other products, the description is still closed.
Hello,
On the impulse theme, go to customizer > product > then click on Description on the left side and uncheck show tabbed. This way the description is always visible. I've attached a screenshot below.
Thanks! I like the tab feature just want it to be open by default and can still be closed manually.
gotcha! Are you familiar with editing the liquid code templates? If so, I can share the code changes so the description is open by default instead of closed. But it would require making a few edits to the liquid code.
That would be awesome! Yes I'm familiar with code changes.
The year-end shopping spree is around the corner! Is your online store ready for the ...
By JasonH Nov 10, 2024We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024