摘要: 经常会看到一些文章列表,每个item只显示一两行的文字,然后点击“详细”的时候,再展开文字自己用jq写了一个~var text = $(".content").text(); var textNum = text.length; var textInt = text.slice(0,140); $(".content").each(function () { if (textNum >= 160) { $(this).html(textInt + "..." + "<a class='dis_btn 阅读全文
posted @ 2011-05-15 11:22 沫鱼 阅读(470) 评论(0) 推荐(0) 编辑