From 55d29cb81cf642a5b9f400eb292d783fb4e4907b Mon Sep 17 00:00:00 2001 From: Jarko Papalitsas <jastpa@utu.fi> Date: Fri, 11 Mar 2022 10:23:43 +0200 Subject: [PATCH] Modify description of dom exercise --- content.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/content.js b/content.js index 3c5a1c1..3384776 100644 --- a/content.js +++ b/content.js @@ -429,11 +429,9 @@ let Content = { find_the_right_element: { instructions: ` - We have some really amazing blogs, but not as amazing web developers... They are trying to write a function that takes a blog <code>id</code> as argument (e.g. 'blog-1' and 'blog-2'). And then, from the element with an <code>id</code> that matches the argument, the function selects <strong>all</strong> the elements that has the attribute <code>class="content"</code>. Finally, the function returns the elements obtained from the previous step.</br></br> - - They have managed to write part of the function but they are still missing something, can you help us to get it working?. Belowe here is the HTML code of the page with our amazing blogs, - if you want to do some tests you can also copy-paste it to your own file and test with it in the developer console. Click "Run & Grade" When you think - that your function is ready. + We have given a task of writing a function that given a <code>blogId</code> (e.g. 'blog-1' or 'blog-2') as an argument, returns all the child elements with class name <code>content</code> for that specific id. For example if the function is given a blog id of <code>blog-1</code>, it should find the element with id <code>blog-1</code> from the document. It should then find all the children of 'blog-1' with class name of <code>content</code> and <strong>return</strong> this list of elements. +</br></br> +Below this description is the HTML source code of the document we are targetting. You may want to copy that HTML document to yourself and test targetting elements with your developer console first. Click "Run & Grade" when you think that your function is ready. <pre><code> <!DOCTYPE html> <html lang="en"> -- GitLab