사용자가 확인란을 선택할 때 추가 내용을 표시해야합니다.확인란을 선택한 경우 div 표시/숨기기
이<!DOCTYPE html>
<html>
<head>
<title>Checkbox</title>
<script type="text/javascript">
$(document).ready(function(){
$('#checkbox1').change(function(){
if(this.checked)
$('#autoUpdate').fadeIn('slow');
else
$('#autoUpdate').fadeOut('slow');
});
});
</script>
</head>
<body>
Add another director <input type="checkbox" id="checkbox1"/>
<div id="autoUpdate" class="autoUpdate">
content
</div>
</body>
</html>
정말 도움, HTML5, CSS3 잘 알고 있지만 아주 기본적인 자바 스크립트/jQuery를 주셔서 감사합니다겠습니까 : 나는 다음과 같은 코드가 있습니다. 머리에 첫
해당 페이지에 jQuery 라이브러리를 포함하고 있습니까 도움이됩니다 아래로 코드를 대체? 예제 코드에서'과 같은 것을 볼 수 없습니다. – andyb
그리고 정확히 당신의 문제는 무엇입니까? 라이브러리가 포함 된 – webduvet
은 단순히 작동하지 않습니까? 확인란을 선택하면 내용이 숨겨지지 않습니다. – user2890036