I want to  

`1. Show and hide a div when I click on the div.`  

`2. Hide Div when click out side div.`  

Here is my code  

**HTML** 

```
<div id="div_1">Click me</div>
<div id="div_2">Show hide text</div>  

```

**CSS** 

```
#div_2{
    display:none;
    border:1px solid black
}
#div_1{
    border:1px solid black;
    }  

```

**SCRIPT** 

```
$('#div_1').on('click', function () {
    $("#div_2").fadeToggle("fast");
});
$('html').on('mouseup', function (e) {
    $("#div_2").fadeOut("fast");
    e.stopPropagation();
});  

```

Here is [DEMO](http://jsfiddle.net/59os3yeq/)  

**Problem**  

It is not working when i click on the div to show, outside div to hide then again on div to show.