/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script type="text/javascript"> $(document).ready(function(){ //Hide div w/id extra $("#extra").css("display","none"); // Add onclick handler to checkbox w/id checkme $("#checkme").click(function(){ // If checked if ($("#checkme").is(":checked")) { //show the hidden div $("#extra").show("fast"); } else { //otherwise, hide it $("#extra").hide("fast"); } });