Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#latest-news .single-min-news .info-news p a").text(function(i, text) {
- if (text.length >= 45) {
- text = text.substring(0, 50);
- var lastIndex = text.lastIndexOf(" ");
- text = text.substring(0, lastIndex) + '...';
- }
- $(this).text(text);
- });
Add Comment
Please, Sign In to add comment