I have two divs and I want to add the class ".active" to only one of them at random.

This is the best I could come up with, however, sometimes both divs get the class added.

```
randomClass: function(){
        var classes = ["active", ""];
         $(".contain > div").each(function(){
           $(this).addClass(classes[~~(Math.random()*classes.length)]);
        });
    },

```

HTML

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

```