If you are having problems with DOM manipulation, simply add all your DOM manipulation scripts as well as the TeddyTags declaration script with the defer
attribute.
Last active
May 10, 2020 09:22
-
-
Save retronav/d24b78593b6fb7b6dd94728162025087 to your computer and use it in GitHub Desktop.
DOM manipulation problem while using TeddyTags
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let lol = document.querySelector("#lol"); | |
lol.addEventListener("click", () => { | |
alert("Event Listener working"); | |
}); | |
let text = document.createElement("myHeader"); | |
text.innerHTML = " Appended me??"; | |
document.querySelector("#myHeader").appendChild(text); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
<script src="https://cdn.jsdelivr.net/npm/teddytags"></script> | |
<script defer src="./event.js"></script> | |
</head> | |
<body> | |
<myHeader name="header">Hello World!</myHeader> | |
<lol>ClICK</lol> | |
<script src="./tags.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment