Answers for "load css file using javascript"

2

append css file with javascript

var cssFile = document.createElement('link');
    cssLink1.rel = 'stylesheet';
    cssLink1.href = "styles.css";  // or path for file {themes('/styles/mobile.css')}
    document.head.appendChild(cssFile); // append css to head element
Posted by: Guest on July-17-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language