Srdjan Srdjan - 8 months ago 47
Javascript Question

Placing logo with Javascript

I have used following code to place logo on my site wpbarbers . com.
Everything works fine in Mozilla and Chrome but Internet Explorer and Safari are not showing logo.

Thanks for tip!

(function() {
var logoHere, logoMain, text;
text = document.querySelector(".header .header-inner .logo a");
text.innerHTML = "";
logoHere = document.querySelector(".header .header-inner .logo a");
logoMain = document.createElement("img");
logoMain.setAttribute("src", "");
logoMain.setAttribute("height", "143");
logoMain.setAttribute("width", "300");
logoMain.setAttribute("alt", "WP Barbers");


Use appendChild not append. append is experimental and not what you are looking for in this case.