Several ready handlears

Several ready handlears

I've got two jQuery ready handlers ( $(function(){}); ) in two separate documents. Both will run. However, I noticed that adding handlers to elements would only work in one of the functions.

For example:

  1. $("#myimage").click(function()
  2. {
  3.         alert("hello");
  4. });
Will not run in one of the scripts (the one I want), but will run in the other. How come?

This is odd, as I see (through firebug) that jQuery indeed runs both ready functions. But it seems to ignore adding this handler.

Any ideas?