Understanding Order Of Execution and Events Within Jquery

Understanding Order Of Execution and Events Within Jquery

Is there documentation that simply explains events such as:

  1. $(function(){}

and

  1. $(window).load(function(){}

and placing an action direct in the page

  1. <script>

  2. $('#div_id').click(function()}
  3.       //do something
  4. });

  5. </script>

and how/when they work with regards to where they are placed within the document?

I eventually figure out the answers as I program, but often find myself stuck until correctly placing the code.

I thought this may be a good resource for others as well.

(If you do not have time to answer, I will build a page tonight with alerts showing the order of execution, then will post my answer)

Thanks!
Rich