title: Call jquery function from php page
body: <p>I created a jquery function in a js file that is included in a php page.</p>
  
  <p>Js file</p>
  
  <pre><code>$( function() {
  
      function disab(){
          $('input#idname').attr('disabled', 'disabled');
      }
  
  });
  </code></pre>
  
  <p>In my php file I tried to call the disab function in this way but with no success.</p>
  
  <pre><code>echo "&lt;script&gt;";
  echo "$(function(){";
  echo "disab();";
  echo "});";
  echo "&lt;/script&gt;";
  </code></pre>
  
  <p>How can I do this? thanks</p>