title: coffeescript - run after page load
body: <p>I'm very new to CoffeScript and want to edit some code that I found.  Right now, it runs this function right when the DOM is loaded:</p>
  
  <pre><code>jQuery -&gt;   
   $('#s3-uploader').S3Uploader
  </code></pre>
  
  <p>How can I rewrite it such that it only runs after the page is loaded?  I need to wait so I can get the correct instance variables:</p>
  
  <pre><code>(on page load) -&gt;   
   $('#s3-uploader').S3Uploader
      additional_data: {project_id: @project.id, step_id: @step.id, user_id: current_user.id} 
  </code></pre>