【发布时间】:2012-09-26 16:45:28
【问题描述】:
当有人将鼠标悬停在我的博客文章标题上时,我正在尝试添加“阅读更多”文本。
我尝试使用
$(".blogpost").mouseover(function(){
$(this).append(" - read more...");
});
但我不知道如何删除阅读更多内容...当 onmouseout 时。
【问题讨论】:
-
使用,在鼠标悬停时使用 .show(),在鼠标悬停时使用 .hide(),在页面加载时使所有阅读内容更加隐藏。这种方法更好,因为您在页面加载时获取它
标签: jquery append mouseover mouseout