How to quit from function while being inside the loop?
Return false does not work.
var children;
var target;
elementLoaded('.inputOne', function (element) {
    children = element;
    target = $('.inputTwo');
    $(children).each(function (x, y) {
        child = $(y);
        if (child.is(":not(:checked)"))
          return false; 
    })
    target.prop("checked", true);
});
Only for clarity used function.
function elementLoaded(el, cb) {
    element = $(el);
    if (element.length) {
        cb(element);
    } else {
        setTimeout(function () {
            elementLoaded(el, cb)
        }, 500);
    }
};
 
    