Dynamic HTML tags work in Internet Explorer but do not work in Chrome
<p>This code create dynamic path for my jquery functions</p>

<pre><code>    var cssElement;

    var arrayCss = new Array;
    arrayCss[0] = 'Content/themes/base/autocomplete_Scrollbar.css';
    arrayCss[1] = 'Content/themes/base/all.css';
    for (var i in arrayCss) {
        cssElement = document.createElement('link');
        cssElement.setAttribute('type', 'text/css');
        cssElement.setAttribute('rel', 'stylesheet');
        cssElement.setAttribute('href', createPath(arrayCss[i]));
        document.head.appendChild(cssElement);
    }

    var element;
    var cdn = new Array;

    cdn[0] = 'Scripts/jquery-ui-1.11.4.min.js';
    cdn[1] = 'Scripts/jquery-2.1.4.js';
    cdn[2] = 'Scripts/jquery-ui-1.11.4.min.js';
    cdn[3] = 'Scripts/jquery-plugin.js';

    for (var i in cdn) {
        element = document.createElement('script');
        element.setAttribute('type', 'text/javascript');
        element.setAttribute('src', createPath(cdn[i]));
        document.head.appendChild(element);
    }
</code></pre>

<p>This is ...
  This code create dynamic path for my jquery functions</p>

<p>function createPath(name) {</p>

<pre><code>    var protocol = document.location.protocol;

    var host = document.location.host;

    var hostname = document.location.hostname;

    var path = protocol + "//" + host + "/" + name;


    return path;`//this return path
}
</code></pre>

<p>This is...</p>