title: "Uncaught ReferenceError: (function) is not defined" with onfocus event
body: <p>I've this input in a scala.html file of my template (I use Play Framework):</p>
  
  <pre><code>&lt;input type="email" name="email" id="email" onfocus="isEmailExistF();" &gt;
  </code></pre>
  
  <p>and this Coffee script:</p>
  
  <pre><code>  isEmailExistF = -&gt;
      $("#email").fadeOut()
  </code></pre>
  
  <p>Then when I focus the input #email nothing happens and the console reports:</p>
  
  <pre><code>Uncaught ReferenceError: isEmailExistF is not defined
    &gt; onfocus
  </code></pre>
  
  <p>But it's the same if I replace <code>onfocus</code> with <code>onblur</code> or others event. CoffeeScript compilation is ok because I've other coffee scripts that work right. I tried to use plain jquery to understand if it's a Coffee issue. I put this code embedded in the code:</p>
  
  <pre><code>&lt;script&gt;
  var isEmailExistF;
  
  isEmailExistF = function() {
    return $("#email").fadeOut();
  };
  &lt;/script&gt;
  </code></pre>
  
  <p>and it works. Where am I wrong?</p>
  
  <p><strong>EDIT</strong>:
  the script file is included in <code>&lt;head&gt;</code>:</p>
  
  <pre><code>&lt;script type="text/javascript" src="/assets/javascripts/main.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>and the content (compiled from coffeescript) is:</p>
  
  <pre><code>(function() {
    var isEmailExistF;
    isEmailExistF = function() {
      return $("#email").fadeOut();
    };
    $(document).ready(function() {
       ...
  </code></pre>