Namespacing function call on onload not working?
<p>Why not working?
Trying to get a namespace function to be called opon page load.
Adding an external script were its held.</p>

<p>Startup script:</p>

<pre><code>$(document).ready(function() { 

slip_init = {   
        init:function() {

            //load external script, see below
    var element = document.createElement("script");
    element.src = "xxxx.js";
    document.body.appendChild(element);

            slip.getbet();
        }
   }

slip_init.init(); 
});
</code></pre>

<p>External script loaded through above function:</p>

<pre><code>var slip;
(function($){

     slip= {
      getbet:function(id) {
             alert(1);
          }
     }

})(jQuery);
</code></pre>
