title: How to add a public method under another public method?
body: <p>I am developing a website with a large library of JavaScript and jQuery code and I am trying to give it a more organized plugin-like structure. I <a href="http://enterprisejquery.com/2010/10/how-good-c-habits-can-encourage-bad-javascript-habits-part-1/" rel="nofollow">read an article</a> showing how to use a self-executing anonymous function to help with scope and it also allows your library to grow across files using the "window.namespace = window.namespace || {}" technique.</p>
  
  <p>For example:</p>
  
  <pre><code>//Self-Executing Anonymous Function:
  (function( skillet, $, undefined ) {
  
      //Private Property
      var isHot = true;
  
      //Public Property
      skillet.ingredient = "eggs";
  
      //Public Method
      skillet.fry = function() {
          // do stuff...
      };
  
      //Private Method
      function addItem( item ) {
          // do stuff...
      }    
  }( window.skillet = window.skillet || {}, jQuery ));
  </code></pre>
  
  <p>Demo: <a href="http://jsfiddle.net/elijahmanor/MVNBz/22/" rel="nofollow">jsFiddle</a></p>
  
  <p>My question is, how would I add a public method under skillet.fry(). So I could make a call to something like skillet.fry.cancel(); </p>
  
  <p>Or, if there is a better way to do this, I am open to suggestions.</p>