4 개의 상자, a, b, c, d가 있으며 사용자가 상자를 선택하면 다음을 수행합니다.raido 버튼 입력을 기반으로 동적 컨텐츠로드
픽업 화상 부하 콘텐츠 1
픽업 화상 B로드 내용 2
픽업 화상 C 부하 콘텐츠 3
픽업 이미지 D 부하 함량 4
I는 모든 콘텐츠를 원하는 라디오 버튼을 클릭 할 때까지 숨겨 지도록로드 될 수 있습니다. 지금까지는 숨겨져 있지만 라디오 버튼을 클릭하면 내용이로드되지 않습니다.
감사합니다. (CamelCase를 포함)
<div id="framework">
<div class="element">
<img style="float:left;" src="img/left.png" />
<img style="padding-left:25px; float:left;" src="img/right.png" />
<img style="padding-left:25px; float:left;" src="img/both.png" />
<img style="padding-left:25px; float:left;" src="img/without.png" />
</div>
<form class="actions">
<div style="clearfix:none;" class="confirm">
<input type="radio" id="frame_left" name="framework">
</div>
<div style="clearfix:none;" class="confirma">
<input type="radio" id="frame_right" name="framework">
</div>
<div style="clearfix:none;" class="confirmb">
<input type="radio" id="frame_both" name="framework">
</div>
<div style="clearfix:none;" class="confirmc">
<input type="radio" id="frame_without" name="framework">
</div>
</form>
</div>
<script>
$(document).ready(function() {
// do your checks of the radio buttons here and show/hide what you want to
$("#navLeft").hide();
$("#navRight").hide();
if ($("#frame_left:checked").length > 0) {
$("#navLeft").hide();
}
// add functionality for the onclicks here
$("#frame_left").click(function() {
$("#navleft").show();
});
$("#frame_right").click(function() {
$("#navRight").hide();
});
});
</script>
<img id="navLeft" src="img/left.png" />
<img id="navRight" src="img/right.png" />
</div>
기존 코드를 제공하세요. –
.click() 라디오 버튼을 참조하십시오. 그리고 그에 대한 방아쇠를 넣으십시오. – theshadowmonkey
죄송합니다. 내 실수로 코드를 게시했습니다. – Nat