[jQuery] JavaScript in loaded page with .load() & init order

[jQuery] JavaScript in loaded page with .load() & init order


I can load page with $("#mydiv").load(url) witch several <script>
code. But order of initialisation is important. When I have it in
classic page all is OK, but when I load page with JQuery I have
problem with "undefined variable" error or problem with access to
loaded DOM model.
Why JQuery init <script> in wrong order?
How are best practice to init code?
Can I use $(xyz).ready()?