Tip: Click lines to highlight, hold ctrl/cmd to multi-select

http://codedumper.com/egoki (7-Aug @ 16:02)

Syntax Highlighted Code

  1. $("input.all").click(function(){
  2.  
  3.     var t = $(this);
  4.     var c = $(':checked', t).length;
  5.  
  6.     if (c == 1) {
  7.         console.log("checked");
  8.     }
  9.  
  10. });

Plain Code

$("input.all").click(function(){

    var t = $(this);
    var c = $(':checked', t).length;

    if (c == 1) {
        console.log("checked");
    }

});

Permalink: http://codedumper.com/egoki