Calling a jquery function on DOM load

Calling a jquery function on DOM load

Hi Everyone, I was wondering the correct way to call a function when the DOM loads.
For example:

  1. $.fn.doThings = function()
  2. {
  3.       ...do some stuff
  4. };
  5.        $(document).ready(doThings);

Any help would be appreciated.
Thanks