我想在悬停时切换帖子列表中的隐藏元素。与 twitter 类似,当您将鼠标悬停在帖子上时,链接菜单将变得不隐藏。
每行帖子都有一个类“帖子”。这是我当前的代码:
$("div.post").mouseover(function() {
$(this).css("background-color", "#f9f9f9");
});
$("div.post").mouseleave(function() {
$(this).css("background-color", "white");
});
每行都有一个跨度类,称为“菜单”。
如何为悬停的帖子打开和关闭跨度“菜单”?