showing results for - "javascript css head"
Martina
13 Oct 2019
1var head = document.getElementsByTagName('head')[0];
2
3    var css = [
4        'https://unpkg.com/leaflet@1.6.0/dist/leaflet.css',
5        'https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.4.1/MarkerCluster.css',
6        'https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.4.1/MarkerCluster.Default.css'
7    ];
8
9    css.forEach(function (item) {
10        var link = document.createElement('link');
11        link.rel = 'stylesheet';
12        link.type = 'text/css';
13        link.href = item;
14        head.appendChild(link);
15    });