title: Call a jquery document ready function from php page
body: <p>Id like to call a jquery function (inside document ready) from php page but with no success.</p>
  
  <p>My php call (first attempt) </p>
  
  <pre><code>echo '&lt;script&gt;'; 
  echo "ShowBox();";
  echo '&lt;/script&gt;';
  </code></pre>
  
  <p>My php call (second attempt)</p>
  
  <pre><code>echo '&lt;script&gt;'; 
  echo "$(function(){ ShowBox(); });";
  echo '&lt;/script&gt;';
  </code></pre>
  
  <p>Jquery document ready page</p>
  
  <pre><code>  $( function() {
  
         function ShowBox(){
           $('.box').show("slow");
         }
  
     });
  </code></pre>
  
  <p>How could I do this?
  Thanks </p>