<script>
// Create element:
const btnn = document.createElement("button");
btnn.innerHTML = "Toggle";
// Append to another element:
const hh = document.querySelector(".hl_controls");
hh.appendChild(btnn);
btnn.setAttribute("id", "ToggleBtn");
const b = document.querySelector("body");
b.setAttribute("id", "bodyOpen");
document.getElementById("ToggleBtn").onclick = function () {
rogiFunction();
};
function rogiFunction() {
document.getElementById("ToggleBtn").classList.toggle("BtnToggleClass");
b.classList.toggle("BToggleClass");
}
</script>
add in header or footer
For
Divi > theme option > integration > Add code to the head of your blog
For
Elementor install new plugin
https://wordpress.org/plugins/custom-css-js/
add html file in head and paste this code and save it
Rogi Network
+923022020318
http://roginetwork.com/
Code Example |
---|
Html :: capture webcam js |
Html :: plantuml font size |
Html :: how to make element bold in bootstrap 4 |
Html :: alpine js click preventdefault |
Html :: email button html |
Html :: how to reduce the size of a button in boostrap |
Html :: starter template bootstrap |
Html :: bootstrap carousel dark |
Html :: agregar atributo jquery |
Html :: how to make an image link on html |
Html :: how to change font color of h2 tag in html |
Html :: how to add double space in html |
Html :: html basic template |
Html :: video player html |
Html :: change the entire page font |
Html :: embed xml in html page |
Html :: telto |
Html :: alt html |
Html :: sup html |
Html :: textbox with dropdown bootstrap |
Html :: color de las letras en html |
Html :: html tab icon title |
Html :: tabs characters in html |
Html :: html space between words |
Html :: eslint ignore v-html |
Html :: get id value of html dropdown in jquery |
Html :: input email tag |
Html :: table rows html |
Html :: intput field submit button |
Html :: google maps css |