Jquery显示悬停效果 /images/hot_post.png“alt=”hot post“> 热柱 这是WordPress的帖子 这是WordPress的帖子 这是WordPress的帖子

Jquery显示悬停效果 /images/hot_post.png“alt=”hot post“> 热柱 这是WordPress的帖子 这是WordPress的帖子 这是WordPress的帖子,jquery,html,css,Jquery,Html,Css,我喜欢通过悬停“hot\u post\u缩略图”来显示“hot\u post\u single>img”和“hot\u post\u title”,默认情况下它们是display:hidden 我应该使用什么代码来实现这一点?我只想显示一个“hot\u post\u single>img”和“hot\u post\u缩略图”,它们与“hot\u post\u缩略图”相对应。这应该可以做到: $(“.hot\u post\u缩略图”).hover(函数(){ $(this).closest(“.h

我喜欢通过悬停“hot\u post\u缩略图”来显示“hot\u post\u single>img”和“hot\u post\u title”,默认情况下它们是display:hidden

我应该使用什么代码来实现这一点?我只想显示一个“hot\u post\u single>img”和“hot\u post\u缩略图”,它们与“hot\u post\u缩略图”相对应。

这应该可以做到: $(“.hot\u post\u缩略图”).hover(函数(){

$(this).closest(“.hot_post_title”).show(); $(this.nexist(“img”).show()


})

是时候自己解决问题了……这与你之前的问题有什么不同?到目前为止,你自己有没有尝试过?如果你自己尝试过,然后陷入困境,而不是简单地要求我们帮你解决,你通常会得到更好的回复。真的,谢谢你的建议。
<div class="hot_post">
<header>
<ul>
    <li><img src="<?php echo get_template_directory_uri(); ?>/images/hot_post.png" alt="hot post"></li>
    <li><h1>Hot Post</h1></li>
</ul> 
</header>
<div class="hot_post_list">
    <ul>
        <li>
            <div class="hot_post_single">
                <a href="" class="hot_post_thumbnail"><img src="http://lorempixel.com/83/83" alt="post title"></a>
                <img src="http://lorempixel.com/40/40" alt="autor_avatar" class="hot_post_avatar">
            </div>
            <div class="hot_post_title">This is post for wordrpess</div>
        </li>
        <li>
            <div class="hot_post_single">
                <a href="" class="hot_post_thumbnail"><img src="http://lorempixel.com/83/83" alt="post title"></a>
                <img src="http://lorempixel.com/40/40" alt="autor_avatar">
            </div>
            <div class="hot_post_title">This is post for wordrpess</div>
        </li>
        <li>
            <div class="hot_post_single">
                <a href="" class="hot_post_thumbnail"><img src="http://lorempixel.com/83/83" alt="post title"></a>
                <img src="http://lorempixel.com/40/40" alt="autor_avatar">
            </div>
            <div class="hot_post_title">This is post for wordrpess</div>
        </li>
    </ul>
</div>