Check with Jquery if second level checkbox from categories are checked

Try this selector:

if ($('div#category-all ul.children input:checked').length) {
    // at least one of the child categories is selected
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)