title: If Internet Explorer - Add Script
body: <p>I'm trying to dynamically add a script if a user is using Internet explorer. I tried IE Conditionals but chrome didn't like the <code>!IE</code> tag so I'm trying it the jquery way:</p>
  
  <pre><code>&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" &gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      if($.browser.msie){
          document.write('&lt;script type="text/javascript" src="ie/ieFix.js" &gt;&lt;/script&gt;');
      }
      else{
          document.write('&lt;script type="text/javascript" src="dynamic.js" &gt;&lt;/script&gt;');
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm not sure why its not letting me just add this, instead it returns <code>'); } else{ document.write(''); }</code></p>
  
  <p>Throwing them in variables has the same effect :/</p>
  
  <p><strong>IE Conditionals</strong></p>
  
  <pre><code>&lt;!--[if !ie]&gt;--&gt;
      &lt;script type="text/javascript" src="dynamic.js" &gt;&lt;/script&gt;
  &lt;!--&lt;![endif]--&gt;
  &lt;!--[if ie]&gt;--&gt;
      &lt;script type="text/javascript" src="ie/ieFix.js" &gt;&lt;/script&gt;
  &lt;!--&lt;![endif]--&gt;
  </code></pre>