Notes
sline_wc is the class selector to put dots at end.
and
include sline_wc_<width> example sline_wc_200, then 200 if the width of the line to shrink the text with dots.
|
<div class="sline_wc sline_wc_200 ft_font sz_zone">
How to find difference between java and java Fx using Highflyer technology.
</div>
|
$(function(){
$.each($(".sline_wc"),function(){
var SplitedData = $(this).attr("class").split(" ");
for (var dataIndex in SplitedData){
if (SplitedData[dataIndex].startsWith("sline_wc_")){
$(this).css({"overflow":"hidden",
"width":parseInt(SplitedData[dataIndex].substring(SplitedData[dataIndex].lastIndexOf("_")+1,SplitedData[dataIndex].length))+40,
"white-space":"nowrap",
"position":"relative"});
$(this).append('<div style="position: absolute;right: 0px;display: inline-block;width: 40px;background-color: white;font-family: arial;"> (..)</div>');
}
}
});
});
|