Return to Snippet

Revision: 17138
at August 24, 2009 18:05 by radarseven


Initial Code
<script type="text/javascript" src="jquery-latest.pack.js"></script>
    <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");
        }
      });

Initial URL

                                

Initial Description

                                

Initial Title
jQuery Checkbox Checked Checking

Initial Tags
textmate, jquery

Initial Language
Other