IMG

2014-05-09 2 views
0

를 가져 가면의 게재 된 모든 사업부가 나는이 있습니다IMG

$(window).load(function(){ 
    $(".hardware").hover(function (e) { 
     $(this).toggleClass('hover', e.type === 'mouseenter'); 
     $(".info").fadeIn(500); 
    }); 
}); 

그리고 내 HTML :

<section> 
    <div class="hardware banner1 top"> 
     <img src="files/images/sakesalverda.png" alt="" class="action"/> 
     <div class="info">sakesalverda.nl</div> 
    </div> 
</section> 

<section> 
    <div class="hardware banner2"> 
     <img src="files/images/ptsd-monitor.png" alt="" class="action"/> 
     <div class="info">ptsd-monitor.com</div> 
    </div> 
</section> 

하지만 .hardware.banner1를 가져 때 두 div가 표시됩니다. 나는 에있는 것이 아니라 banner에있는 div를 표시하는 것을 wan't 만합니다.

+0

이벤트 유형은 각 .hardware에 대해 동일합니다. –

답변

4

당신은 사용해야

$(this).find('.info').fadeIn(500); 

당신은 .info.hardware 내부가 아닌 그들 모두를 fadeIn을 원하기 때문에.

관련 문제