title: SyntaxError: function statement requires a name
body: <p>im confused about this error which i become without todo any event like click etc.
  Yes i used the search here, but in all of the cases i found the situation was another problem.</p>
  
  <p>The "SyntaxError: function statement requires a name" was throwing by firebug after a pagerefresh here: <code>onGoTo:function(evt){</code></p>
  
  <p>this is my function:</p>
  
  <pre><code>function exampleFc(ctx){
  'use strict';
  
    var goTo = $('a[href*=#]',this.$ctx);
    goTo.on('click',$.proxy(this.onGoTo,this));
  
   onGoTo:function(evt){
       evt.preventDefault();
       var elem = $(evt.currentTarget).attr('href');
  
       if(elem.length &gt; 1){
           $('html,body').animate({
               scrollTop: $(elem).offset().top
           }, 700, function (){location.hash = elem;});
       }
       return false;
   }
  </code></pre>
  
  <p>};</p>
  
  <p>whats wrong? i want to call the function onGoTo by catching the click event.</p>