클릭하면 컨테이너를 뒤집기 위해 CSS를 사용하고 있습니다.두 번째 클릭시 컨테이너 표시
페이지의 컨테이너 once flipped
및 hide all other
컨테이너의 뒷면이 확대되도록 JQuery를 얻으려고합니다.
컨테이너가 clicked again
인 경우 return to normal
(모든 컨테이너를 다시 표시)로 설정합니다.
이것은 내 코드에 관한 것입니다.
$('.f1_container').click(function(event) {
$('.f1_container').toggleClass('active').width(320).height(400);}).click(function(){
$('.f2_container,.f3_container,.f4_container,.f5_container,.f6_container').hide();
});
내 숨겨진 컨테이너를 숨긴 채 두 번째 클릭하면 내 문제가 발생합니다.
여기 내 입니다.입니다.
<div class="f1_container">
<div class="shadow f1_card">
<div class="front face">
<img src="images/y1.jpg" style="height: 160px; width: 160px;">
</div>
<div class="back face center">
Some text inside here
</div>
</div><!-- end of shadow f1_card -->
</div><!-- end of f1_container -->
<div class="f2_container">
<div class="shadow f2_card">
<div class="front face">
<img src="images/o1a.jpg" style="height: 160px; width: 160px;">
</div>
<div class="back face center">
Some text inside here
</div>
</div><!-- end of shadow f2_card -->
</div><!-- end of f2_container -->
<div class="f3_container">
<div class="shadow f3_card">
<div class="front face">
<img src="images/o1a.jpg" style="height: 160px; width: 160px;">
</div>
<div class="back face center">
Some text inside here
</div>
</div><!-- end of shadow f3_card -->
</div><!-- end of f3_container -->
사용 .toggle을()? (http://api.jquery.com/toggle/) – nicolas
귀하의 HTML 코드도 제공하십시오. 그렇지 않으면 귀하가 무엇을하려고하는지, 그리고 요소/클래스가 어떻게 호출되고 구조화되어 있는지 이해하기가 매우 어렵습니다. 여기에 실수를 저질렀다면 도움이 될 것입니다 ... – Steini
[피들] (http://jsfiddle.net/wrektshy/)을보고 어떻게 할 수 있는지보십시오. – Regent