From ea25aeb2931bdf4ad469bff560477b26bd85be78 Mon Sep 17 00:00:00 2001 From: Ilenia Date: Wed, 27 Jul 2022 23:38:32 +0200 Subject: [PATCH] fix: step 65 don't accept wrong syntax (#47018) --- .../5f3ef6e0a81099d9a697b550.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/curriculum/challenges/english/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0a81099d9a697b550.md b/curriculum/challenges/english/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0a81099d9a697b550.md index 98d0ef2d239..e028524b41d 100644 --- a/curriculum/challenges/english/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0a81099d9a697b550.md +++ b/curriculum/challenges/english/14-responsive-web-design-22/learn-basic-css-by-building-a-cafe-menu/5f3ef6e0a81099d9a697b550.md @@ -14,31 +14,33 @@ Inside the `footer`, add a `p` element. Then, nest an anchor (`a`) element in th You should not modify the existing `footer` element. ```js -assert($('footer').length === 1); +assert(document.querySelectorAll("footer").length === 1); ``` -Your new `p` element should be nested within your `footer` element. +Your new `p` element should be nested within your `footer` element. You should have exactly one `p` element. ```js -assert($('footer').children('p').length === 1); +assert(document.querySelectorAll("footer > p").length === 1); +assert(document.querySelectorAll("footer p").length === 1); ``` -Your new `a` element should be nested within your new `p` element. +Your new `a` element should be nested within your new `p` element. You should have exactly one `a` element. ```js -assert($('footer').children('p').children('a').length === 1); +assert(document.querySelectorAll("footer > p > a").length === 1); +assert(document.querySelectorAll("footer a").length === 1); ``` Your new `a` element should have the text `Visit our website`. ```js -assert($('footer').find('a')[0].innerText.match(/Visit our website/i)); +assert(document.querySelector("footer > p > a")?.innerText === "Visit our website"); ``` Your new `a` element should link to `https://www.freecodecamp.org`. Remember that `a` elements use the `href` attribute to create a link. ```js -assert($('footer').find('a').attr('href') === 'https://www.freecodecamp.org'); +assert(document.querySelector("footer > p > a")?.href === "https://www.freecodecamp.org/"); ``` # --seed-- @@ -97,6 +99,7 @@ assert($('footer').find('a').attr('href') === 'https://www.freecodecamp.org'); --fcc-editable-region-- --fcc-editable-region--