mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
fix(curriculum): replace jQuery with vanilla js (#56499)
This commit is contained in:
+3
-3
@@ -58,7 +58,7 @@ assert.equal(document.querySelectorAll('section')[0]?.previousElementSibling?.ta
|
||||
Each `section` element should start with an `h2` element that serves as the title for that section.
|
||||
|
||||
```js
|
||||
const sections = $('section');
|
||||
const sections = document.querySelectorAll('section');
|
||||
assert.equal(sections?.length, 3)
|
||||
for (let section of sections) {
|
||||
assert.equal(section.children[0]?.tagName, 'H2');
|
||||
@@ -69,7 +69,7 @@ for (let section of sections) {
|
||||
Each `section` element should contain a `p` element to introduce the video content as its second child.
|
||||
|
||||
```js
|
||||
const sections = $('section');
|
||||
const sections = document.querySelectorAll('section');
|
||||
assert.equal(sections?.length, 3)
|
||||
for (let section of sections) {
|
||||
assert.equal(section.children[1]?.tagName, 'P');
|
||||
@@ -80,7 +80,7 @@ for (let section of sections) {
|
||||
Each `section` element should contain an `iframe` element as its third child.
|
||||
|
||||
```js
|
||||
const sections = $('section');
|
||||
const sections = document.querySelectorAll('section');
|
||||
assert.equal(sections?.length, 3)
|
||||
for (let section of sections) {
|
||||
assert.equal(section.children[2]?.tagName, 'IFRAME');
|
||||
|
||||
Reference in New Issue
Block a user