I have a checkbox list, the user selects the ones of their preference and then presses a button and they are saved.
$('#GuardarPermisos').on('click', function () {
Guardar();
}
This I want to change to that every time you click on a checkbox you save the selection without having to press the button.
The generated checkboxes have a class, with which I do the following:
$('.tiposas').on('click', function () {
alert('a');
});'
Each click on one must perform an action, but it does not work unless you put an alert before the event.
$(document).ready(function () {
alert('con este alert si funciona')';
$('.tiposas').on('click', function () {
alert('a');
});
});
I do not know what I'm doing wrong, I hope you can help me
Thank you.