using window.onload instead of document.ready

using window.onload instead of document.ready

Ive been advised to use "window.onload" instead of "document.ready" and im having problems implementing it, im sure its a syntax error.


here is my original code
  1. var chart;
  2. $(document).ready(function() {

and i want to change it to onload, and im trying to get this to work
  1. var chart;
  2. $(window).onload(function() {


what is the proper syntax for using window.onload with jquery?