0
내부의 특정 요소를 가져옵니다 "image_small_2.jpg
는"나는 "image_big_2.jpg
"내가 DIV (표시 없음) 내부에 특정 IMG을 얻을 수있는 문제가 생겼어요 숨기기
을 얻을 필요하지만 "image_small_1.jpg
"또는 두 번째 이미지를 클릭하면 - 그것은 마지막 "image_big_..n.jpg
"를 보여줍니다.
$(function(){
$(".showhide").on("click", function(){
$(".content").css("display","block");
});
});
그 중 하나가 작동하지 않습니다. 당신이 a
의 두 가지 유형에 대한 이벤트 처리기를 부착, jQuery를에 그런
<a title="show" class="showhide">show<img src="image_small_1.jpg" /></a>
<div class="content"><img src="image_big_1.jpg" />
<a class="hide"><img class="close" src="x.png" alt="x">close</a>
</div>
<a title="show" class="showhide">show<img src="image_small_2.jpg" /></a>
<div class="content"><img src="image_big_2.jpg" />
<a class="hide"><img class="close" src="x.png" alt="x">close</a>
</div>
<a title="show" class="showhide"><img src="image_small_..n.jpg" /></a>
<div class="content"><img src="image_big_..n.jpg" />
<a class="hide"><img class="close" src="x.png" alt="x"></a>
</div>
을 :
대단히 감사합니다. 대단 하네! – 3113