From 303b16a50de20a311be772f438dcfdf2d879e463 Mon Sep 17 00:00:00 2001 From: "acdoyle630@gmail.com" Date: Mon, 23 Jan 2017 21:00:41 -1000 Subject: [PATCH 1/9] number 1 --- js/app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/app.js b/js/app.js index ef302b1..6640fba 100644 --- a/js/app.js +++ b/js/app.js @@ -6,6 +6,13 @@ The function will add the following content inside the paragraph with the id of var bacon = "Shoulder turducken brisket, kevin swine andouille tri-tip salami tail ham sausage pork loin. Ribeye short loin rump kielbasa pork. Capicola short loin turducken corned beef tongue, chuck leberkas salami frankfurter. Kielbasa fatback pancetta, ground round meatball turducken jowl ribeye alcatra sirloin bacon corned beef beef ribs short loin. Pork belly spare ribs biltong corned beef meatball short ribs tongue alcatra swine drumstick. Biltong shankle kevin, cupim sirloin bresaola brisket. Tail pork belly biltong ball tip tri-tip, pig jerky cow pastrami prosciutto ;ground round bacon capicola tongue meatball."; +function moreContent ( ) { + var addBacon = document.getElementById ('main'); + addBacon.id = 'more'; + addBacon.innerHTML = bacon; +} + + //2. HTTP /*Create a function named `lessContent` that will initiate the `Show Less` link after clicking on it. From 64c30a962cc588538a248075f3f69d33020d0dec Mon Sep 17 00:00:00 2001 From: "acdoyle630@gmail.com" Date: Mon, 23 Jan 2017 21:08:55 -1000 Subject: [PATCH 2/9] Number 2 --- js/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 6640fba..63e6209 100644 --- a/js/app.js +++ b/js/app.js @@ -18,7 +18,10 @@ function moreContent ( ) { /*Create a function named `lessContent` that will initiate the `Show Less` link after clicking on it. The function will hide the contents in the pargraph with the id of `less` after clicking on the `Show Less` link.*/ - +function lessContent ( ) { + var showLess = document.getElementById ('less'); + showLess.style.display = 'none'; + } //3. Tacocat, The Original Palindrome King From 6bbca6a80bc939c97867f72c87421419a01d43e2 Mon Sep 17 00:00:00 2001 From: "acdoyle630@gmail.com" Date: Mon, 23 Jan 2017 21:22:14 -1000 Subject: [PATCH 3/9] Number 4 --- js/app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/js/app.js b/js/app.js index 63e6209..5c75697 100644 --- a/js/app.js +++ b/js/app.js @@ -27,6 +27,10 @@ function lessContent ( ) { //3. Tacocat, The Original Palindrome King /*Create a function named `zoom` that will increase the font size of the paragraph with the id of `biggie` after hovering your mouse over it. Increae the font size to 150%*/ +function zoom ( ) { + var bigZoom = document.getElementById ('biggie'); + bigZoom.style.fontSize = '30px'; +} //4. McDonalds @@ -34,7 +38,13 @@ function lessContent ( ) { Next, create a function named valueMenu that will display your favorite items in the paragraph the the id of `menu` after clicking on the showMenu paragraph.*/ +var menu = ['MacChicken', 'Big Mac', 'fries']; + +function valueMenu ( ) { + var mcMenu = document.getElementById ('menu'); + mcMenu.innerHTML = menu; +} //5. Gin. /*Create a function named redFace that will change the paragraph text to red and a font size of 20px after clicking on the text.*/ From 1d3ff60a9ef12b1d0c372f3086db03f549b3b92c Mon Sep 17 00:00:00 2001 From: "acdoyle630@gmail.com" Date: Mon, 23 Jan 2017 21:27:07 -1000 Subject: [PATCH 4/9] number 5 --- js/app.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 5c75697..212b344 100644 --- a/js/app.js +++ b/js/app.js @@ -55,8 +55,11 @@ function valueMenu ( ) { pElement.style.fontSize = "20px"; } */ - - +function redFace ( ) { + var pElem = document.getElementById ('drink'); + pElem.style.color = 'red'; + pElem.style.fontSize = '20px'; +} //6. Peanut Butter Cup Oreos /*Create a function `showPrice` that will add the price of `$5.55` inside the paragraph with the id `price` after hovering your mouse over the paragraph.*/ From f9d53466435e711ed75490e0aebebd77e6a538e3 Mon Sep 17 00:00:00 2001 From: "acdoyle630@gmail.com" Date: Mon, 23 Jan 2017 21:28:41 -1000 Subject: [PATCH 5/9] number 6 --- js/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/app.js b/js/app.js index 212b344..f0c7f40 100644 --- a/js/app.js +++ b/js/app.js @@ -64,7 +64,10 @@ function redFace ( ) { //6. Peanut Butter Cup Oreos /*Create a function `showPrice` that will add the price of `$5.55` inside the paragraph with the id `price` after hovering your mouse over the paragraph.*/ - +function showPrice ( ) { + var pElem = document.getElementById ('oreo'); + pElem.innerHTML = '$5.55'; +} //7. Mr. Buttons /*Add an Event Listener to the button that will display `myQuote` inside the paragraph with the id of `displayQuote` after the button is clicked.*/ From 7cef417c4a2ba26a694a67c8b5bf7a502ac2bf56 Mon Sep 17 00:00:00 2001 From: "acdoyle630@gmail.com" Date: Mon, 23 Jan 2017 21:33:30 -1000 Subject: [PATCH 6/9] number 7 --- js/app.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/app.js b/js/app.js index f0c7f40..7054e25 100644 --- a/js/app.js +++ b/js/app.js @@ -74,7 +74,12 @@ function showPrice ( ) { var myQuote = "Our lives are defined by opportunities; even the ones we miss."; +Benjamin.addEventListener ('click', quote); +function quote ( ) { + var pElem = document.getElementById ( 'displayQuote'); + pElem.innerHTML = myQuote; +} //8. Say It again, Randomly /*Create a function that will generate a random quote from the variable below after clicking on the button.*/ From d03939a32a63d2dfaacb3a34457adc5b38f45a97 Mon Sep 17 00:00:00 2001 From: "acdoyle630@gmail.com" Date: Mon, 23 Jan 2017 21:48:26 -1000 Subject: [PATCH 7/9] number 8 --- js/app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/js/app.js b/js/app.js index 7054e25..8cad31c 100644 --- a/js/app.js +++ b/js/app.js @@ -86,8 +86,18 @@ function quote ( ) { var quotes = ["It's a funny thing about comin' home. Looks the same, smells the same, feels the same. You'll realize what's changed is you.", "Momma? Momma? Some days, I feel different than the day before.", "Some people, were born to sit by a river. Some get struck by lightning. Some have an ear for music. Some are artists. Some swim. Some know buttons. Some know Shakespeare. Some are mothers. And some people, dance.", "For what it's worth, it's never too late to be whoever you want to be."]; +random.addEventListener ('click', quoteGen); +function quoteGen ( ) { + var arr = quotes[Math.floor(Math.random()*quotes.length)]; + var pElem = document.getElementById ('random'); + pElem.innerHTML = arr; + + + + +} //9. Unlock the Secret to Financial Freedom /*Create an event listener that will show and hide the message when clickig on the button. From 1f1dd39d94530df180a2d37b38b7c303c0ba515d Mon Sep 17 00:00:00 2001 From: "acdoyle630@gmail.com" Date: Tue, 24 Jan 2017 16:59:38 -1000 Subject: [PATCH 8/9] number 9 --- js/app.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/app.js b/js/app.js index 8cad31c..06d81a5 100644 --- a/js/app.js +++ b/js/app.js @@ -102,3 +102,15 @@ function quoteGen ( ) { //9. Unlock the Secret to Financial Freedom /*Create an event listener that will show and hide the message when clickig on the button. */ + +showHide.addEventListener("click", toggle); + +function toggle() { + var elem = document.getElementById('showmoney'); + if (elem.style.display === "none") { + elem.style.display = "initial"; + } + else { + elem.style.display = "none"; + } +} \ No newline at end of file From 42cf0115885da454b935560e9987f0167bc06868 Mon Sep 17 00:00:00 2001 From: "acdoyle630@gmail.com" Date: Wed, 25 Jan 2017 18:13:01 -1000 Subject: [PATCH 9/9] final --- css/styles.css | 2 +- js/app.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/css/styles.css b/css/styles.css index 8b88456..ee0614c 100644 --- a/css/styles.css +++ b/css/styles.css @@ -32,7 +32,7 @@ p{ #showmoney{ display: none; -} +} button{ background-color: aqua; diff --git a/js/app.js b/js/app.js index 06d81a5..6aebb27 100644 --- a/js/app.js +++ b/js/app.js @@ -109,8 +109,7 @@ function toggle() { var elem = document.getElementById('showmoney'); if (elem.style.display === "none") { elem.style.display = "initial"; - } - else { + } else { elem.style.display = "none"; } } \ No newline at end of file