Guest User

Untitled

a guest
Feb 15th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. Plain Language Explanation of 3 User Stories
  2.  
  3. 1.You should be able to add items to the list:
  4. handleNewItemSubmit() will contain an event listener on submit form id ($('#js-shopping-list-form')) and input for name entry
  5. will be added to STORE with a unique id. generateShoppingItemsString() and generateItemElement will manipulate the DOM
  6. and update the display of shopping list following renderShoppingList().
  7.  
  8. 2.You should be able to check items on the list:
  9. generateItemElement() provides a class name parameter for checked status that is linked to CSS strike-through style. An event
  10. listener on the individual list item class ($('.button-label') will toggleClass for the "shopping-item__checked" class
  11. which will effectively remove and add strike-through styles for unchecked and checked items respectively.
  12.  
  13. 3.You should be able to delete items from the list:
  14. generateItemElement() provides a "js-item-delete" class on the button element labeled "Delete" for each individual list item.
  15. Attaching an event listener ($('.js-item-delete')) and grabbing the id value from the closest 'li' of the selected item
  16. with .data('id') can be used to remove the item by id from the STORE.
  17. Afterwards, renderShopping() will display the remaining items with id's that don't match the one selected because
  18. they're all uniquely generated.
Add Comment
Please, Sign In to add comment