title: appendChild not working in internet explorer
body: <p>I need to be able to pass in either a tag or id to append the content and js files.  As usual this works in every browser except ie, ie only works with document.getElementsByTagName('head')[0].appendChild.  Is there a fix for this?</p>
  
  <p><a href="http://jsfiddle.net/qg5zexmh/" rel="nofollow">http://jsfiddle.net/qg5zexmh/</a></p>
  
  <pre><code>// Append js and html.
  function _append(selector, arr) {
      var content = arr;
      for(var i = 0; i&lt; content.length; i++) {
          var _content = content[i];
          var js = _content.indexOf('script');
          if(js &gt; -1) {
              // Script tag.
              var script = document.createElement('script');
              script.type = 'text/javascript';
              var regex = /&lt;script.*?src="(.*?)"/gmi;
              var url = regex.exec(_content);
              var inline = '';
              if(url) {
                script.src = url[1];
              } else {
                _content.replace(/&lt;script[^&gt;]*&gt;([\s\S]*?)&lt;\/script&gt;/gi, function(){
                  inline += arguments[1] + '\n';
                });
                script.text = inline;
              }
              //document.getElementsByTagName("head")[0].appendChild(script);
              selector.appendChild(script);
          } else {
              // html content.
              selector.innerHTML += _content;
          }
      }
  }
  // Selector - div or tag.
  var selector = document.getElementById('content');
  </code></pre>