On click read more show text content Jquery PHP MYSQL fetch data


Onclick link read more text hide text jquery.How to hide and show more text within a certain length.Jquery Read More and Less A smooth, responsive jQuery set in PHP Mysql for collapsing and expanding long content and text with Show link Read more and Close links.

Create A Dynamic on click link Read more and Close links Using PHP Mysql, Jquery Show Less and More Content Text onclick link php more and less toggle Link php mysql


<span class="more">

Lorem ipsum Content show for demo Lorem ipsum Lorem ipsum



.morecontent span {

    display: none;


.morelink {

    display: block;




$(document).ready(function() {

    // Configure/customize these variables.

    var showChar = 100;  // How many characters are shown by default

    var ellipsestext = "...";

    var moretext = "Show more >";

    var lesstext = "Show less";    


    $('.more').each(function() {

        var content = $(this).html();


        if(content.length > showChar) {


            var c = content.substr(0, showChar);

            var h = content.substr(showChar, content.length - showChar);


            var html = c + '<span class="moreellipses">' + ellipsestext+ '&nbsp;</span><span class="morecontent"><span>' + h + '</span>&nbsp;&nbsp;<a href="" class="morelink">' + moretext + '</a></span>';








        if($(this).hasClass("less")) {



        } else {






        return false;