What's your biggest current challenge? Have your say in Community Polls along the right column.

Product tab feature

Solved

Product tab feature

amfintl
Shopify Partner
3 0 2
 

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

amfintl_0-1721654691896.pngamfintl_1-1721654704617.png

 

Accepted Solution (1)

Huptech-Web
Shopify Partner
1011 204 217

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

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required

View solution in original post

Replies 2 (2)

Huptech-Web
Shopify Partner
1011 204 217

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

If you found this response helpful, please do like and accept the solution. Thanks!
Need support with Customizing your Shopify store?
Feel free to contact me at info@huptechweb.com or Visit our website Huptech Web.
Instant Shortcode Builder: Integrate customizable UI features anywhere in your store - No coding knowledge required
amfintl
Shopify Partner
3 0 2

Thank you sir, it works perfectly 😍