2013-12-18 112 views
-4
<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> 

Jquery的顯示懸停效果

我喜歡他們是顯示懸停 「hot_post_thumbnail」,默認情況下,顯示 「hot_post_single> IMG」 和 「hot_post_title」:隱藏;

我應該用什麼代碼來做到這一點?我喜歡僅顯示一個「hot_post_single> img」和「hot_post_thumbnail」,它們是「hot_post_thumbnail」的相對值。

+1

現在是時候嘗試自己解決您的問題了......這與您之前的問題有何不同? –

+0

到目前爲止,你有沒有做過任何嘗試?當你試圖自己做這件事,然後陷入困境時,通常會在這裏發佈更好的回覆,而不是簡單地要求我們爲你做。 –

+0

真的那是,謝謝你的建議。 – webHasan

回答

0

這應做到: $( 「hot_post_thumbnail。 」)懸停(函數(){

$(本).closest()顯示(); $ (這一點)。「 hot_post_title。」 .closest(「img」)。show();

});