jQuery logo

For jQuery 1.6+  use .prop() function. I don't think it's a good idea to support old versions and use .attr() or something like this.

Using .prop('checked') you don't need to think about checkbox control value.