How To Boundary Characters Inwards Div Alongside Jquery?
It is actually slowly to limit the unwrap of characters inward a div, detail class, ID etc yesteryear a detail value.
$(function(){ $(".target-div").each(function(i){ var len = $(this).text().length; if(len > 100){ $(this).text($(this).text().substr(0,100)+'...'); } }); });If desired, take the dots from the halt ('...'). I would recommend keeping it to permit your users know that the text was shortened. Sumber http://developer-paradize.blogspot.com
Comments
Post a Comment