pjs is undefined (processingjs)
<p>if i use this:</p>

<pre><code>$(document).ready(function() {
    pjs = Processing.getInstanceById("EyeCanvas");
    console.log(pjs);
}
</code></pre>

<p>then pjs is always undefined</p>

<p>when i use this:</p>

<pre><code>function test() {
    pjs = Processing.getInstanceById("EyeCanvas");
    console.log(pjs);
}
</code></pre>

<p>and trigger test() with a button then pjs = D.Processing, as it should be.</p>

<p>I load the scripts in this order:</p>

<pre><code>    &lt;script type="text/javascript" src="processing-1.3.6.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="jquery1-7-1.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="script.js"&gt;&lt;/script&gt;
</code></pre>

<p>How can i work with pjs without have people to press a button?</p>
