Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

jquery checkbox checked or not

<script>
    $(document).ready(function(){
        $('input[type="checkbox"]').click(function(){
            if($(this).prop("checked") == true){
                console.log("Checkbox is checked.");
            }
            else if($(this).prop("checked") == false){
                console.log("Checkbox is unchecked.");
            }
        });
    });
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #jquery #checkbox #checked
ADD COMMENT
Topic
Name
2+4 =