title: How to include jQuery dynamically in any website using pure javascript
body: <p>I am trying to include jquery dynamically and i have used the following code-</p>
  
  <p>index.php</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript" src="includejquery.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="testing"&gt;&lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $('#testing').html('&lt;p&gt;This is a paragraph!&lt;/p&gt;');
      });
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>includejquery.js</p>
  
  <pre><code>if(!window.jQuery)
  {
      var script = document.createElement('script');
      script.type = "text/javascript";
      script.async = true;
      script.src = "http://code.jquery.com/jquery-2.1.1.min.js";
      document.getElementsByTagName('head')[0].appendChild(script);
      jQuery.noConflict();
  }
  </code></pre>
  
  <p>But jquery functionality is not working it is not printing the paragraph tag :-( Please help me out. Thanks in advance</p>