diff --git a/html/javascript/request.js b/html/javascript/request.js index bd94d4f..013bc49 100644 --- a/html/javascript/request.js +++ b/html/javascript/request.js @@ -87,9 +87,15 @@ function addToCart(){ var cart = getCartItems(); //this is an array cart.push(id); //push to bottom of cart localStorage.setItem('cart', JSON.stringify(cart)); + $('#added').fadeIn(1000); + $('#added').fadeIn(1000); + $('#added').fadeOut(1000); + } + else{ + $('#already').fadeIn(1000); + $('#already').fadeIn(1000); + $('#already').fadeOut(1000); } - else - alert("That item is already in your cart!"); } function inCart(id){ @@ -137,4 +143,6 @@ function isUnavailable(id){ } } return 0; -} \ No newline at end of file +} + +//this code allows a message to appear that indicates that the item was successfully placed in the shopping cart. diff --git a/html/webpages/requestPage.html b/html/webpages/requestPage.html index 7fb32bb..e0d333b 100644 --- a/html/webpages/requestPage.html +++ b/html/webpages/requestPage.html @@ -10,7 +10,7 @@ Synchrony Financial - +