hi all, I have a problem, when the checkbox is clicked there is no reaction. here is the code:
index.html <html> <head> <title>test</title> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="darkTodo.js"></script> <style type="text/css"> #messagewindow { height: 250px; border: 1px solid; padding: 5px; overflow: auto; } #wrapper { margin: auto; width: 438px; } </style> </head> <body> <div id="wrapper"> <form id="chatform"> <p>Wat ?</p><p><input type="text" id="author" /></p> <p>Todo</p><p><input type="text" id="msg" size="50"/></p> <input type="submit" value="ok" /><br /> </form> <div id="messagewindow"> </div> </body> </html> and the javascript : $(document).ready(function(){ $(':checkbox').click(function(){ alert("test"); }); $("form#chatform").submit(function(){ $test = '<input name="test" type="checkbox" value="1">'; $("#messagewindow").prepend($test+"<b>"+$("#msg").val()+"</b><br / >"); return false; }); });