BrandiAngel Posted October 3, 2023 Posted October 3, 2023 Hi! I'm looking for a way to hide/expand a long description within a content item's description on our team's reviews page. I've found code for expanding FAQs and accordion style, but not within a text block like this. Ideally, I'd like to make the large chunk of text show only the first paragraph and then expand if the reader would like to read more. Thanks!
tuanphan Posted October 7, 2023 Posted October 7, 2023 Hi, Can you share link to this page? We can check easier I used to do this similar with List Section Simple BrandiAngel 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
BrandiAngel Posted October 18, 2023 Author Posted October 18, 2023 Sorry! I didn't have notifications on - the site is https://it.fscj.edu/shout-outs. Thanks!!
tuanphan Posted December 23, 2023 Posted December 23, 2023 I used to do similar with List Section, my ideal is to add this the add this code to Page Header Code Injection to enable more info when users click Read Bio text <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script> <script> $(document).ready(function() { $('li.list-item').each(function(i, e) { $(this).click(function() { $(this).toggleClass('tp-list-des-open'); }); }) }); </script> <style> .list-item-media:hover, h2.list-item-content__title:hover { cursor: pointer; } .list-item-content__description { height: 0; overflow: hidden; transition: all 0.1s ease; } .tp-list-des-open .list-item-content__description { height: 100%; transition: all 0.1s ease; } h2.list-item-content__title:after { content: "Read Bio"; display: block; font-size: 14px; font-style: italic; margin-top: 20px; } .tp-list-des-open h2.list-item-content__title:after {opacity:0;} </style> Inscape 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment