How can I disable a checkbox until data are load?

I need to disable checkboxes until the page load the data(products) and then enable them again,
this is my code for loading data:

function loadCounter(filterCounter) {
$.each(filterCounter.FilterCounter, function (key, value) {
    if (value.Count !== 0) {
        $("#filter .btn-groupl label :input[value='" + key + "']").parent("label").find("span.items-amount").text(value);
        $("filter .btn-group label :input[value='" + key + "']").parent("label").show();
    } else {
       ;
        $("filter .btn-group label :input[value='" + key + "']").parent("label").hide();
        
    }
});