title: jQuery accessibility with PHP GET parameters
body: <p>This has been in my mind for a long while now and I can't seem to figure it out myself. Neither do I find any useful information about this, out there, so I hope to get some answers here instead.</p>
  
  <p>I'm using jQuery which is integrated into my site, together with a lot of PHP GET parameters to control what content you're watching. However jQuery doesn't seem to be available when code inside an if-block with a GET parameter tries to reach it.</p>
  
  <p>Example PHP:</p>
  
  <pre><code>if($_GET["page"]) {
      echo "&lt;div class='box'&gt;Click me&lt;/div&gt;";
  }
  </code></pre>
  
  <p>Example jQuery:</p>
  
  <pre><code>$(".box").click(function() {
      alert("Box!");
  });
  </code></pre>
  
  <p>When you press "Click me", nothing would happen, as it the jQuery code doesn't exist. Why is this happening and is there any workarounds for this?</p>