title: "Uncaught SyntaxError: Unexpected string" in javascript
body: <p>this code gives me an error saying "Uncaught SyntaxError: Unexpected string" on line:</p>
  
  <pre><code>"$("#mainPage").load('pages/' . name . '.php');" 
  </code></pre>
  
  <p>why? should i show the entire page code?</p>
  
  <pre><code>$("#mainPage").fadeTo(500, 0, function() {
      name = $(button).attr('name');
      $("#mainPage").load('pages/' . name . '.php');
      var page = "pages/" .name. ".php";
      var state = {
        "canBeAnything": true
      };
  
      history.pushState(state, "new Page", "main.php?page="+page);
  });
  </code></pre>