How to add "read more" and "read less" button on product description

Blaze5451
New Member
1 0 0

Hi, Could some one help me in adding a read more and read less button on my product descriptions as they are a bit legnthy,  i've tried some codes from other topics on this but they didn't work, please help also im using the brooklyn theme if that helps. Thanks 

0 Likes
Qualitycheck
Shopify Expert
1404 114 220

hi,

try this 

$(document).ready(function () {    $(".content").hide();    $(".show_hide").on("click", function () {
        var txt = $(".content").is(':visible') ? 'Read More' : 'Read Less';        $(".show_hide").text(txt);        $(this).next('.content').slideToggle(200);
    });
});
0 Likes
Andrew_McWhirt1
New Member
2 0 2

Where do we add this code?

Thanks