Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Follow these steps: - In this task, you will be required to modify your files from the previous task. - Follow these steps: main.js: Modify

image text in transcribed

image text in transcribed

Follow these steps: - In this task, you will be required to modify your files from the previous task. - Follow these steps: main.js: Modify your function which displays each item as list elements as follows: - Each created list element should contain a span element with a class named close. Each span element should have a value of 'luOOD7', which represents the character ' x ' in unicode. - As the last line of this function, call a function (described below) to delete an item from the shopping list. - Create a function which will update the grocery items array by getting the value of the text in the input tag and adding it to the array. - If the input text field is empty, display an alert to the user indicating that they should insert an item. Else, add the input text to the array. - Once the item has been added to the array or the alert displayed, reset the input text's value to an empty string. - As the last line of this function, call the function created in the previous task to display the updated array items. - Create a function to delete items from both the array and the Shopping List display. - Add a click event listener to each element with a close class - when the event is triggered, delete the item from the array and set the display style to none for the specific list parent element. - Add a click event listener to the html element with the ID of itemList. - If the event's tag name is a list tag, toggle a checked class on the event element. - Add a key up event listener to the HTML element with an input ID. - If the event key code is equal to ' 13 ' (the key code for the 'Enter' key), trigger a click() function on the element with an addButton ID. CSS: - All elements with a checked class should have styling which indicates that the item has been checked off the shopping list. HTML: - Add an onclick attribute to the HTML element with an addButton ID. When this element is clicked, the function which updates the shopping list should be called. Compulsory Task Follow these steps: - Create a module for finding current information on a particular city. Information for the city, including coordinates, can be found using this API. - We will make use of (node.js)Fetch - You can work under the assumption that the city is always in South Africa. - The following details are to be shown: Population - Elevation o Current temperature (using this weather API) - All potential errors should be appropriately handled

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Analysis In Microsoft Excel

Authors: Alex Holloway

1st Edition

B0CCCPKTTX, 979-8852388452

More Books

Students also viewed these Databases questions

Question

Find y'. y= |x + X (x) (x) X 1 02x+ 2x 1 O 2x + 1/3 Ex 2x +

Answered: 1 week ago

Question

4. How has e-commerce affected business-to-business transactions?

Answered: 1 week ago