jquery.click function problem
Hello,
I'm trying to do the following: when a user clicks on a checkbox an alert message box must appear.
I have try with the following code but does not work:
<h3>Listado</h3>
<p></p>
<table border="1">
<thead>
<tr>
<th>Sel</th>
<th>Apellidos</th>
<th>Nombre</th>
<th>Seccion</th>
</tr>
</thead>
<tbody>
<tr>
<td><input id="check1" type="checkbox" value="1" /></td>
<td>Martin Martin</td>
<td>Enrique</td>
<td>embalajes</td>
</tr>
</tbody>
</table>
<script>
jQuery('#check1').click(function() {
alert('Hola');
});
</script>
As I could read on the jquery api examples, this code is very close to the
examples that are published there but I do not understand why this one does not work.
Anyone could help me, please??
Thanks in advance