I am paginating users and in my view I have:
<%= user.profile %>
I want to limit li.profile to 200 characters followed by three dots '...'
Below does not work:
$(document).ready(function(){
$("li.profile").each(function(){
if ($(this).html().length > 200) {
$(this).html($(this).html().substr(0, 200));
$(this).append('...');
}
});
});
this is the way it looks in developer tools.
css
li.profile {
font-size: 14px;
padding-bottom: 5px;
text-align: left;
padding-left: 5px;
}
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)