this code is not working please check and reply

this code is not working please check and reply

ranjit37ranjit37 Posts: 1Questions: 1Answers: 0
edited April 27 in Free community support
  "data": "Paragraph", "name": "Paragraph", 'className': "text-right p1", "searchable": false, "orderable": false,
                    "render": function (data, type, row, meta) { // render event defines the markup of the cell text
                        //return row.Paragraph;                      
                        //return '<p class="slide-read-more"><a href="#" class="a" ' + row.Paragraph+ '</a></p> ';
                        debugger;
                        if (row.Paragraph== "" || row.Paragraph.length <= 30) {
                            return row.Paragraph
                        }
                        else {
                            
                            var shortText = row.Paragraph.substring(0, 90);
                            var cleanStr = row.Paragraph;
                            return shortText + '...' + "<a id=\"toggleButton\" onclick=\"toggleShowMoreLessText('" + cleanStr + "');\" href=\"javascript:void(0);\">(Read more)</a>"
                        }

                        toggleShowMoreLessText:function(desc)
                           {
                                return desc + '...' + "<a id=\"toggleButton\" onclick=\"prism.ra.toggleShowMoreLessText('" + desc + "');\" href=\"javascript:void(0);\">(Read less)</a>"
                            }

                        
                    }

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

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    How is it not working!?

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Colin

Sign In or Register to comment.