I want check if there is not class `.myclass2` in classs `.myclass1` alert ok but it don't work in my try:

**DEMO:** <http://jsfiddle.net/uyKvh/>

```
<div class="myclass1">
    <div class="myclass2">1</div>
</div>
<div class="myclass1">
    <div class="myclass2">1</div>
</div>

if($(".myclass1:not(:has(.myclass2))")){
    alert('ok');
}

```