title: In JQuery, how do I add an onload or init even to an object?
body: <p>I'd like to have a select box control display / hiding of sections in a form</p>
  
  <p>First, I added an .change event on the item, and this works if I actually change the item</p>
  
  <pre><code>$('#mySelect').change(
         function() {
              updateSections($(this));
         });
  </code></pre>
  
  <p>Then all I wanted is to have the <code>.change</code> event be called at least once, when the page is loaded</p>
  
  <p>The only way I could think of is in <code>$(document).ready</code> which seems like a detached location</p>
  
  <pre><code>$(document).ready(function(){
      updateSections($('#mySelect'));
  
  }
  </code></pre>
  
  <p>The main issue is that I don't have the ID of the item from where I write the function (generated code)</p>
  
  <p>So I would like to do something like this (conceptional code), and don't know if there is any way to do it </p>
  
  <pre><code>$('#mySelect').change(
         function() {
              updateSections($(this));
         }).init(
         function() {
              updateSections($(this));
         });
  </code></pre>
  
  <p><code>.load()</code> only works on <code>a</code> / <code>img</code> tags</p>
  
  <p>Also from a design perspective, the onDraw of an item is a standard event in any UI framework, and having one event directly on the object, and one on the document looks weird to me</p>