I want to toggle a class of a DIV by clicking on it, but not while clicking a link inside that DIV.

I tried this but it toggle the class even when a link is clicked:

```
$("ol.compacted .tl_general:not(a)").click(function () {
    $(this).toggleClass("re-expanded");
});

```

What could I do? Thanks in advance!