Answers for "javascript css head"

0

javascript css head

var head = document.getElementsByTagName('head')[0];

    var css = [
        'https://unpkg.com/[email protected]/dist/leaflet.css',
        'https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.4.1/MarkerCluster.css',
        'https://cdnjs.cloudflare.com/ajax/libs/leaflet.markercluster/1.4.1/MarkerCluster.Default.css'
    ];

    css.forEach(function (item) {
        var link = document.createElement('link');
        link.rel = 'stylesheet';
        link.type = 'text/css';
        link.href = item;
        head.appendChild(link);
    });
Posted by: Guest on September-22-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language