in datatables .each() is not working for all pages.....please suggest any solution

in datatables .each() is not working for all pages.....please suggest any solution

soumicksoumick Posts: 4Questions: 2Answers: 0
edited March 2016 in Free community support
$('#example tbody tr .comment-space').each(function () {
                var content = $(this).html();
                if (content.length > showChar) {
                    var show_content = content.substr(0, showChar);
                    var hide_content = content.substr(showChar, content.length - showChar);
                    var html = show_content + '<span class="moreelipses">' + ellipsestext + '</span><span class="remaining-content"><span>' + hide_content + '</span>&nbsp;&nbsp;<a href="" class="morelink">' + moretext + '</a></span>';
                    $(this).html(html);
                }
        }); 

Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

Answers

  • allanallan Posts: 63,761Questions: 1Answers: 10,510 Site admin

    Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.

    Information on how to create a test page], if you can't provide a link to your own page can be found here.

    Thanks,
    Allan

This discussion has been closed.