I’m trying to add HTML inside an element but I’m having serious problems escaping quotes and such.
I tried so many things and I’m not even getting the slashs, this is how it looks: (I removed any attempt of escaping because it was making it even more confusing)
document.getElementById("sharerContainer").innerHTML =
"<div onclick='teleport('justwalk.it/house?uid=" + sharerID +
"')'><div class='face' style='background-image: url('https://graph.facebook.com/" +
sharerFID + "/picture');'></div>" + sharer;
Is there another way to write HTML through javascript to reduce this kind of problems?
Or you can try jQuery