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

Highlighted
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
Highlighted
Shopify Expert
1342 111 181

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);
    });
});
Thanks & Regards
Perennial Solution

Problem Solved?✔️Like and Accept the solution that can help others.
Need any help with theme customization or design? Hire us
Email: infoperennialsolution@gmail.com
Skype: infoperennialsolution
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes