From c2977daa0213e186fdcccbdef4a195df20191855 Mon Sep 17 00:00:00 2001 From: heatherdawn30 <50744196+heatherdawn30@users.noreply.github.com> Date: Mon, 8 Jul 2019 19:15:10 -0600 Subject: [PATCH] Create shoppingApp.js --- shoppingApp.js | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 shoppingApp.js diff --git a/shoppingApp.js b/shoppingApp.js new file mode 100644 index 00000000..250b2842 --- /dev/null +++ b/shoppingApp.js @@ -0,0 +1,43 @@ +//when check button is pressed line goes through item +//remove HTML element when delete is pressed +//add HTML element when add is pressed +//link to jQuery ($()) +//link your JS to HTML/CSS page on github +//keyboard friendly (return/tab used when toggle button in place) +//add links to your JS in HTML code (at bottom) + +$(function add() { + $("js-shopping-list-form").click(function(event) { + event.addItem(); + $(li).append(
  • + $('shopping-List-Entry'.val("")) +
    + + +
    ); + ) + } + $(add); +} + +$(function delete() { + event.deleteItem(); + $("shopping-item-delete").click(function(event) { + $(li).not("shopping-item"|$('shopping-List-Entry'.val("")) + ) + } + $(delete); +} + +$(function check() { + event.checkItem(); + $("shopping-item-toggle").click(function(event) { + $(this).css("text-decoration", "line-through"); + + } + $(check) +}