Overwrite object methods / functions
<p>I have the <code>original.js</code> file, but I want to change some things in it. I can't modify <code>original.js</code>, but I can add another <code>better.js</code> file so that I could overwrite some functions of <code>original.js</code></p>

<p><code>original.js</code> contains:</p>

<pre><code>MyHandler = {
   data:{},
   var1:false;
   handlers:{},

   init:function(handlers){
       function1();
       function2();
   }
   function1:function()
   {
    // function1 code that needs to be replaced
   };
}

$(document).ready(function ()
{
///...some code
      MyHandler.init();
}
</code></pre>

<p>I want to rewrite <code>function1()</code> with new content.
What should I put within <code>better.js</code> file?</p>

<p>P.S. I know <code>better.js</code> <strong>should follow after</strong> <code>original.js</code>.</p>

<p>I've tried to put the code below to <code>better.js</code>, but it doesn't work (seems like none of <code>function1</code> work then)</p>

<pre><code>MyHandler = {
   function1:function()
   {
    // new code
   };
}
</code></pre>

<p>What am I doing wrong?</p>
