Skip to content

Instantly share code, notes, and snippets.

@bUxEE
Created October 4, 2017 11:37
Show Gist options
  • Select an option

  • Save bUxEE/dc250f2e1660b842b1e256a500898da9 to your computer and use it in GitHub Desktop.

Select an option

Save bUxEE/dc250f2e1660b842b1e256a500898da9 to your computer and use it in GitHub Desktop.
// consulente error checks
consulente_errors_list = [];
$('#detrazione-fiscale-consulente .consulente-checK input[type="checkbox"]').change(function () {
consulente_errors_list = $('#detrazione-fiscale-consulente .consulente-checK input[type="checkbox"]:checked').map(function (i) {
var classes = $(this).closest('.cmb-row').attr('class');
var error_el = '.' + classes.match("cmb2-id-([a-zA-Z\-]+)")[1];
//console.log(consulente_errors_list);
//console.log(error_el);
return error_el;
}).get();
});
$('#detrazione-fiscale-consulente .consulente-checK').clickoutside(function() {
$('#df_consulente_error_fields').val(JSON.stringify(consulente_errors_list));
console.log($('#df_consulente_error_fields').val());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment