[jQuery] ready firing twice on the page
Hi all,
I am trying to load some partials on page load and they are not
necessarily aware of each other (different people will be developing
them and they're pulled together on a page before sending to the
client).
Since it's designed this way there is a $(document).ready block on
each partial with some code to initialize each partial. The strange
thing is that when the page loads, the ready block is triggered twice
for each partial. It has the same behavior in IE and FireFox.
There is a ready block on the main page but it doesn't get called
twice, just the blocks on the partials do. It all gets sent to the
client at once so I'm not sure what the difference between the page
ready block and the others is and why they all don't fire twice or all
just fire once (preferred!).
Has anyone seen behavior like this before and have some ideas what
might be going on?
Is there some kind of "element ready" that I can use instead of the
document?
Thanks for any help!