title: Including PHP depending on screen width size
body: <p>I read a lot about it, I tried a lot as well... I almost think it's possible, but I need your help.</p>
  
  <p>I want to load some content depending on the screen width. It's a sticky navbar with social network sharing buttons (follow on twitter, like on facebook, the usual).</p>
  
  <p>Using this code, It loads the html, perfectly. BUT the scripts inside it, does not. I use jQuery animation to show the buttons when the cursor is over the logo, and the buttons use javascript to, well, work. But, loading this way, it's like there was no scripts inside that html.</p>
  
  <pre><code>$(function () {
     var width = $(window).width();
     if (document.documentElement.clientWidth &gt;= 992) 
        $('#Navbar').load('navbar.html');
  });
  </code></pre>
  
  <p>I tried with PHP, then. A simple <code>include()</code> worked. The navbar was loaded the way it was supposed to.</p>
  
  <p>Since PHP cannot know the screen width (and since I am using bootstrap, I following it's screen sizes), I thought I could do this (I changed the .html to .php, it's all the same)</p>
  
  <pre><code>$('#NavBar').append('&lt;?php include "navbar.php"; ?&gt;');
  </code></pre>
  
  <p>But it doesn't work.</p>
  
  <p>Is there a way for me, using jQuery, to call the <code>include()</code>? Or any other way that could make this work?</p>
  
  <p>Media queries and <code>display: hidden</code> are not options. I don't want to load the content and keep it hidden. I want to just load it when it's needed.</p>