text excerpt...character limit

1st Method:-
$("#erd_content").text(function(index, currentText) {
return currentText.substr(0, 60);
});

2nd Method:-
var txt= $('.erd_content').text();
if(txt.length > 61)
$('.erd_content').text(txt.substring(0,60) + '...');

Comments

Popular posts from this blog

datatable with both top and bottom scroll bar.

Display Loader and disable page while waiting for ajax request

Remove GIT integration from VSCode