10. Event Delegation πŸ‘©β€πŸŽ“πŸ‘¨β€πŸŽ“

πŸ“– Implement Shopping List Item Deletion

Implement the following user story:

  • As an online shopper, I want to be able to remove items from my list.

Acceptance Criteria

  • It’s done when each item’s Remove button can be clicked to remove its respective shopping list item.

πŸ“ Notes

Refer to the following documentation:

jQuery documentation on event delegation

πŸ’‘ Hints

  • Use your knowledge in DOM traversal to select an element’s parent.

  • The jQuery method for deleting an element is .remove().

πŸ† Bonus

If you have completed the activity and want to further your knowledge, work through the following challenge:

  • What are some alternatives to using jQuery?.

You can read this guide to whether you need jQuery to see some alternatives.


βœ… Solutions

Solutions Click Here