title: Uncaught SyntaxError: Unexpected identifier. Firefox works. Chrome not
body: <p>The last js function in this document(refreshuserinfo) works fine in Firefox, but in Chrome an Safari it doesn't work.</p>
  
  <p>The console shows me: 
  <strong>Uncaught ReferenceError: refreshuserinfo is not defined</strong>  and <strong>Uncaught SyntaxError: Unexpected identifier</strong> </p>
  
  <p>i've got no idee why this function doen't work in these Browsers</p>
  
  <pre><code>    &lt;/script&gt;
      &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;head&gt;
          &lt;meta name="viewport" content="width=device-width,  initial-scale=1.0,  maximum-scale=1.0,  user-scalable=no"&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;link rel="stylesheet" href="css/style.css"&gt;
          &lt;link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"&gt;
          &lt;link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,300italic,700' rel='stylesheet' type='text/css'&gt;
          &lt;link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'&gt;
          &lt;link href='http://fonts.googleapis.com/css?family=Exo+2:400,100,200' rel='stylesheet' type='text/css'&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div id="meldung"&gt;&lt;/div&gt;
          &lt;div class="logo"&gt;
              Quiz
          &lt;/div&gt;
  
          &lt;div class="wrapper-menu"&gt;
              &lt;div id="element"&gt;
                  &lt;div id="element2"&gt;&lt;/div&gt;
                  &lt;!--Hier wird das JSON eingefügt--&gt;
              &lt;/div&gt;
              &lt;div class="wrapper-menu-inner"&gt;
                  &lt;hr&gt;
                  &lt;a onclick="shuffle()" href="#"&gt;&lt;div&gt;Spielen&lt;/div&gt;&lt;/a&gt;
                  &lt;a href="kategorien.html"&gt;&lt;div&gt;Kategorie wählen&lt;/div&gt;&lt;/a&gt;
                  &lt;a href="#" onclick="randomCategory()"&gt;&lt;div&gt;Zufällige Kategorie spielen&lt;/div&gt;&lt;/a&gt;
                  &lt;hr&gt;
                  &lt;a href="editor_category.html"&gt;&lt;div&gt;Kategorie erstellen&lt;/div&gt;&lt;/a&gt;
                  &lt;a href="editor_question.html"&gt;&lt;div&gt;Frage erstellen&lt;/div&gt;&lt;/a&gt;
                  &lt;a href="#" onclick="logout()"&gt;&lt;div&gt;Abmelden&lt;/div&gt;&lt;/a&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
      function refreshuserinfo() {
          $('#refresher').addClass("fa-spin");
          setTimeout(function()$('#refresher').removeClass('fa-spin'),3000);
          $.ajax ({
                  url:'http://marcelkipp.com/quizapp/userinfo.php?user_id='+localStorage.getItem('user_id'),
                  dataType: 'json',
                  type: 'get',
                  cache: false,
                  success:function(data) {
                      console.log('JSON erfolgreich ausgelesen!');
                      var category = data.category_title;
                      if (category==null) category = "Keine Kategorie gewählt";
                      localStorage.setItem('points', data.points);
                      localStorage.setItem('total_questions',data.number_pq);
                      $('#element2').empty();
                      $('#element2').append("&lt;a href='#'&gt;&lt;div class='menu_username nopointer'&gt;"+localStorage.points+"&amp;nbsp;Punkte&lt;/div&gt;&lt;/a&gt;"+
                      "&lt;a href='#'&gt;&lt;div class='menu_username nopointer'&gt;"+localStorage.total_questions+"&amp;nbsp;gespielte Fragen&lt;/div&gt;&lt;/a&gt;")
                  }
              });
      }
      &lt;/script&gt;   
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>