;(function($){
//多行文本溢出
$.fn.dot=function(num){
var _num=!num?140:num;
var realLength = 0,
text=$(this).text(),
length = text.length;
for (var i = 0; i < length; i++) {
var charCode = text.charCodeAt(i);
if (charCode >= 0 && charCode <= 128) {
realLength += 1;
} else {
realLength += 2;
}
if(realLength>_num){
break;
}
}
if(i<length){
var newStr=text.substr(0,i)+"...";
$(this).text(newStr);
}
return this;
}
})(jQuery)