Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-git.js"></script>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>Using jQuery display the checked attribute and property of a checkbox as it changes.</title>
</head>
<body>
<input id="check1" type="checkbox" checked="checked">
<label for="check1">Check me</label>
</body>
</html>
 
$( "input" )
  .change(function() {
    var $input = $( this );
   console.log(".attr( 'checked' )");
   console.log(".prop( 'checked' ): " +$input.prop( "checked" ))    ;       
console.log(".is( ':checked' ): " + $input.is( ":checked" ) );               
  })
  .change();
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
w3resourcepro
0viewers