Skip to content

Commit b435c8a

Browse files
committed
Remove JQuery
1 parent d586bcf commit b435c8a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<html>
22
<head>
33
<link rel="stylesheet" type="text/css" href="main.css" />
4-
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
54
<script defer src="main.js"></script>
65
</head>
76

main.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ fetch('https://api.github.com/repos/code4community/git-tutorial/git/trees/master
77
.then(response => response.json())
88
.then(data => {
99
const filenames = data.tree.map(element => element.path)
10+
const body = document.getElementsByTagName('body')[0]
1011

1112
filenames.forEach(filename => {
12-
$('body').append(
13-
"<div class=\"head-container\"><img class=\"head\" src=\"images/" + filename + "\"/></div>"
14-
)
13+
body.innerHTML += "<div class=\"head-container\"><img class=\"head\" src=\"images/" + filename + "\"/></div>"
1514
})
1615

1716
const people = document.getElementsByClassName("head-container");

0 commit comments

Comments
 (0)