title: UIWebView + custom javascript object
body: <p>I'm using a UIWebView with local jquery and a script that defines a function, like this:</p>
  
  <pre><code>function myFunc() {
      var myVar;
  
      function info() {
          alert('info');
      }
  }
  </code></pre>
  
  <p>What I cannot accomplish is such a simple task:</p>
  
  <pre><code>var myfunc = new myFunc();
  myfunc.info();
  </code></pre>
  
  <p>in the UIWebView. How can I instantiate a new object and call a function of that object by using:</p>
  
  <pre><code>[webViewObject stringByEvaluatingJavaScriptFromString:@"myfunc.info();"];
  </code></pre>
  
  <p>I'm struggling about this.</p>