Question: I used to use the following to know if a clicked item was a checkbox:

```
if ($(e.target).className === 'checkbox') {}

```

After upgrading to the latest version of jQuery this now returns undefined for Chrome, Safari and Firefox.

What is the best way to determine if a click happened on a checkbox?

Thanks

Answer: 
With straight JS, I usually do:

```
var eTarget = e.target !== null ? e.target : e.srcElement;

if (eTarget.type === 'checkbox') { }

```
```
       $(document).ready(function () {
       $("input:checkbox").click(function () {
           if ($(this).is(":checked")) {
               //Do Stuff if Checked
           } 
       });
   }); 

```