I have a div like this:

```
<div class='myclass'></div>

```

Sometimes i need to make these div dynamically and add another class to it. I do it like this

```
if(condition1)
  appendClass = 'xyz'
if(condition2)
  appendClass = 'abc'
if(condition3)
  appendClass = 'usb'

$('main').append("<div class = myclass "+ appendClass +"/>")

```

but when i check this div with firebug i get this

```
 <div class="myclass" xyz=""/>

```

which should have been

```
 <div class="myclass xyz"/>

```

I tries using `append.replace(/"/g, '')` but same result. 
Please help!!