I'm working on creating a read more option for my articles. I've refer jQuery docs and tried out below way. But I want to hide the content inside .disp-cont class when read more clicked. and show it only when 'read less' clicked.
Please advice how to adjust below code
<div class="row">
                                        <div class="col-md-12"><strong>subject</strong></div>
                                        <div class="disp-cont col-md-auto">
                                             Lorem Ipsum is simply dummy text of the printing an
                                        </div>
                                        <div class="more-cont col-md-auto" style="display:none;">
                                          
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s
                                        </div>
                                        <a href="#" class="more col-md-auto">read more</a>
                                   
                                    <div class="col-md-12">no record</div>
                                    
                                </div>
//Toggle Read more
$(document).ready(function () {
        $('.row .more').click(function(e) {
                 e.preventDefault();
            $(this).text(function(i, t) {
            return t == 'read less' ? 'read more' : 'read less';
            }).prev('.row .more-cont').slideToggle()
        });
    });
 
     
    