Personalized checkout and custom promotions with Shopify Scripts
Hi professional,
I am using product tab feature
But I want to change 1 thing
When I open product tab A, then open product tab B, the product tab A still expand together product tab B. Like shown in the picture
I want when I click product tab B, the product tab A will be automatically close. It only show 1 product tab at 1 time
Then the theme supporter tell me to fix this in this file but doesn't tell me what code I should replace. Here is the liquid file https://pastebin. pl/view/5da040f6
Can you check and help me?
Thanks a lot
Solved! Go to the solution
This is an accepted solution.
Hi @amfintl
You can achieve this by putting the below code in the file accordion_information.liquid file
<script>
$(document).ready(function(){
$('.collapse').on('show.bs.collapse', function () {
$('.collapse.show').each(function(){
$(this).collapse('hide');
});
});
});
</script>
Thank you.
DP
This is an accepted solution.
Hi @amfintl
You can achieve this by putting the below code in the file accordion_information.liquid file
<script>
$(document).ready(function(){
$('.collapse').on('show.bs.collapse', function () {
$('.collapse.show').each(function(){
$(this).collapse('hide');
});
});
});
</script>
Thank you.
DP
Thank you sir, it works perfectly 😍
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025