jeudi 20 octobre 2016

Checkbox not working as expected in JSP

I have a table and I want to hide some columns if I check a checkbox.

The checbox code is:

<input type="checkbox" name="id" value="Java"> Java

and in order to handle it, I have a simple jquery function:

$(document).on("change", "input[type=checkbox]", function(e) {
   alert('hello');
   //code           
});

Actually I tried other methods of write this function, but even, if I just call it when an input is clicked it doesn't work...

The problem is, that if I use it with input, all the others input call the function, but the checkbox no.

Any tip of JSP checkbox will be appreciated =)

Thanks




Aucun commentaire:

Enregistrer un commentaire