append css file with javascript
document.getElementsByTagName("head")[0].insertAdjacentHTML(
"beforeend",
"<link rel=\"stylesheet\" href=\"path/to/style.css\" />");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
document.querySelector('head').innerHTML += '<link rel="stylesheet" href="styles.css" type="text/css"/>';
Also in JavaScript:
- material.preactjs type = date use
- js check number of caracters
- Updating Object Properties
- array destructuring in javascript
- immediately invoked function expression
- loop javascript
- see if discord message is in dm discord.js
- jquery get 2nd child
- how can we take selected index value of dropdown in javascript
- delete first character javascript
- express img folder
- Vue is not defined
- discord.js rich embed
- how to align text inside react component
- gitignore for angular
- javascript select row all delete
- vertical line for pong javascript
- datatables clear table
- javascript string includes substring
- javascript reload page
- change the position of div using javascript
- nextjs with typescrip example
- how to flatten array with reduce in javascript
- what is ... in javascript