Question: I have two divs:

```
<div class="dialog large"></div>

```

and

```
<div class="dialog"></div>

```

I have to remove the one with the class "dialog" but keep the one with "dialog large".

If I do `$('dialog').remove();` they are both removed.

Can anyone help me with this?

Answer: 
```
$('div.dialog:not(.large)').remove();

```

**[DEMO](http://jsfiddle.net/QStkd/512/)**

### A little explain

`div.dialog` will select `div` with `class=dialog` (in this case both div will select). But

`div.dialog:not(.large)` will exclude those `div` with `class` `large` and remove them.

### Related Refs

* **[:not()](http://api.jquery.com/not-selector/)**
* **[class selector](http://api.jquery.com/class-selector/)**
Use this:

```
$("div.dialog").not('.large').remove();

```

[Fiddle](http://jsfiddle.net/v74V4/1/) here...