New loaded page with its own script

New loaded page with its own script

Hello everyone,
I have a dynamic page that depends on the previous one. This page is loaded into the dom by jquery after a form submit. I need some jquery code to handle the second page but i don't know how to organize it: putting the js code in a separated file with its own $(document).ready didn't work cause also the previous page had its own js file with a $(document).ready function associated.
On the other hand, putting all the code in only one js file doesn't work either cause the elements that i want to refer in the code for the second page are not ready yet when only the first page is loaded.

Do you have a suggestion on how should i split the code/pages?

Thank you in advance for your help
cheers
Giuseppe