please check instruction: assignment3.pdf in the zip. (for screenshots and more details)
Objective:
The objective of this assignment is to use JavaScript to create an interactive webpage.
Task:
You will create a simple shopping cart to purchase Radiohead albums. The HTML code for the webpage is provided (assignment3.html). You are free to modify the content (the text descriptions of the items, use your favorite band albums if you hate Radiohead ☺ ) but do not change the structure. Below is a screenshot:
The tasks are:
1. When the user moves the mouse pointer on the album name (e.g. “OK Computer”), the details about the album appear (you can take text from Wikipedia/other sources if you are modifying content). The text should go back to the original when the mouse pointer moves away (Hint: use mouseover and mouseout events).
2. When the user clicks “Add to Cart” for an item, the “Cart Total” is updated, and the button to add that specific item to cart is disabled so that it can’t be added twice. (Hint: to disable a button, you can use buttonName.disable, where buttonName is the variable that can access the button element).
3. Finally, the user can input an amount into the input field beside “Confirm Purchase” and click the button. If the amount is less than the “Cart Total” the following alert should be shown:
Otherwise, the following alert should be shown:
Hint: To read the value of the number in the input field, you can use elementName.value, where elementName is the variable that can access the input field.