Question about .delegate

Question about .delegate

Hello all,

here is my Testcode:

  1. <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
  2. <table id="idTable" border="1">
  3. <tbody>
  4. <tr>
  5. <td>foo</td>
  6. <td>bar</td>
  7. </tr>
  8. <tr>
  9. <td>foo</td>
  10. <td>bar</td>
  11. </tr>
  12. </tbody>
  13. </table>

  14. <script language="javascript" type="text/javascript">
  15. $('#idTable').delegate('tbody > tr > td:nth-child(1)', 'mouseup', function(event)
  16. {
  17. alert('clicked td');
  18. return false;
  19. }
  20. );
  21. $('#idTable').delegate('tbody > tr', 'click', function(event)
  22. {
  23. alert('clicked tr');
  24. return false;
  25. }
  26. );
  27. </script>

My expected outcome is:

1) click on any foo alert "clicked td"
2) click on any bar alert "clicked tr"

Real outcome is:

1) click on any foo alert "clicked td" AND "clicked tr"
2) click on any bar alert "clicked tr"

in the documentation i found

To cancel a default action and prevent it from bubbling up, return false

This does not work for me.
Can anyone help me?

thx Mike