My html code 

```
<div id="delete">Delete</div>

```

My javascript code

```
$(function(){
$("#delete").click(function(){
var decision=decide("Do you really want to delete?");
});
});
function decide(str)
{
$("delete").after(str+'<button onclick="yes()">Yes</button><button onclick="no()">No</button>');
}
function yes(){return 1;}
function no(){return 0;}

```

Currently my yes and no are returning 0/1 but i want a return 0/1 from decide function depending upon no/yes.