This my code: 

```
$('.upgrade-strength').on('click', function () {
    var strCount = $('#strId');
    var points = $('#points');
    var userId = $(this).attr('id');
    strCount.html(function(i, val) { return val*1+1 }); 
    points.html(function(i, val) { 

    if(val*1>0){
         return val*1-1;
     }else{
        document.getElementById("strBtn").innerHTML = "";
        document.getElementById("dexBtn").innerHTML = "";
        document.getElementById("vitBtn").innerHTML = "";
        document.getElementById("intBtn").innerHTML = "";
     }

});

    $.ajax("/upgrade-strength/"+userId,
    {

    });     
});

```

`<p>Available points: <strong><span id="points">{{Auth::user()->points}}</span></strong></p>`

When I clicking the button the counter goes down till 0 and then button dissapears. But what happens more is, when the 
`points.html(function(i, val)` reaches zero the button did not dissapear. You have to click one more time tu buttons dissapear. How to solve this ?