From a0483aafbc918f94e7831caf7d5d013b0d040189 Mon Sep 17 00:00:00 2001 From: Anthony Simpson Date: Tue, 16 Feb 2016 12:10:50 -0700 Subject: [PATCH 1/6] so readyb to manipulate --- boxes.html | 6 ++++++ boxes.js | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/boxes.html b/boxes.html index 44586a8..f296288 100644 --- a/boxes.html +++ b/boxes.html @@ -33,6 +33,12 @@
+ diff --git a/boxes.js b/boxes.js index 6b2b3db..282d98b 100644 --- a/boxes.js +++ b/boxes.js @@ -1 +1,4 @@ -console.log("hello world"); +$(function() { + console.log( "ready!" ); +}); +// console.log("hello world"); From 7cdf6b7c4465784130fe92442a66203a85327d0d Mon Sep 17 00:00:00 2001 From: Anthony Simpson Date: Tue, 16 Feb 2016 12:36:32 -0700 Subject: [PATCH 2/6] about halfway thru first repo --- boxes.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/boxes.js b/boxes.js index 282d98b..bd30290 100644 --- a/boxes.js +++ b/boxes.js @@ -1,4 +1,16 @@ $(function() { - console.log( "ready!" ); + console.log( "ready!" ); + $('#secretBox').on('mouseover', function(){ + $(this).css({'background-color': 'white', 'border-bottom': '1px solid black'}) + }).append('

Secret box!

'); + $('#row1 > div').on('mouseover', function(){ + $(this).addClass('boxType3') + }); + $('#row1 > div:last-child').on('mouseover', function(){ + $(this).css({'display': 'none'}) + }); + $('.boxType1').on('mouseover', function(){ + $(this).css({'background-color': 'white', 'border-bottom': '1px solid black'}) + }); }); // console.log("hello world"); From 9811f86be11b369eaf9301187c332fff303d1d3f Mon Sep 17 00:00:00 2001 From: Anthony Simpson Date: Tue, 16 Feb 2016 14:59:54 -0700 Subject: [PATCH 3/6] almost done boxing but i need a bit more --- boxes.html | 8 ++++---- boxes.js | 13 +++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/boxes.html b/boxes.html index f296288..673d281 100644 --- a/boxes.html +++ b/boxes.html @@ -15,10 +15,10 @@
-
-
-
-
+
1
+
2
+
3
+
4
diff --git a/boxes.js b/boxes.js index bd30290..48b31a4 100644 --- a/boxes.js +++ b/boxes.js @@ -9,8 +9,17 @@ $(function() { $('#row1 > div:last-child').on('mouseover', function(){ $(this).css({'display': 'none'}) }); - $('.boxType1').on('mouseover', function(){ - $(this).css({'background-color': 'white', 'border-bottom': '1px solid black'}) + $('.boxType1').css({'background-color': 'white', 'border-bottom': '1px solid black'}).append("Click Me") + $('#row2 > div:first-child, #row2 > div:first-child+div').css({'all': 'initial'}); + $(" #container > div:not(.row), #container > div:not(#secretBox)").css({'width': '2px'}); + $('#container').on('click', function(e) { + console.log(e.pageX + ' , ' + e.pageY); + }); + $('.boxType1').on('click', function(){ + alert("You can never leave the page"); }); + + + }); // console.log("hello world"); From 3bad6f2273da7bfdfbc7b7fbcdf90b28637e4121 Mon Sep 17 00:00:00 2001 From: Anthony Simpson Date: Tue, 16 Feb 2016 15:18:34 -0700 Subject: [PATCH 4/6] on puppies --- boxes.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/boxes.js b/boxes.js index 48b31a4..dd95f46 100644 --- a/boxes.js +++ b/boxes.js @@ -1,7 +1,7 @@ $(function() { console.log( "ready!" ); $('#secretBox').on('mouseover', function(){ - $(this).css({'background-color': 'white', 'border-bottom': '1px solid black'}) + $(this).css({'background-color': 'white', 'border-bottom': '4px solid orange'}) }).append('

Secret box!

'); $('#row1 > div').on('mouseover', function(){ $(this).addClass('boxType3') @@ -11,12 +11,18 @@ $(function() { }); $('.boxType1').css({'background-color': 'white', 'border-bottom': '1px solid black'}).append("Click Me") $('#row2 > div:first-child, #row2 > div:first-child+div').css({'all': 'initial'}); - $(" #container > div:not(.row), #container > div:not(#secretBox)").css({'width': '2px'}); + // $(" #container > div:not(.row), #container > div:not(#secretBox)").css({'width': '2px'}); $('#container').on('click', function(e) { console.log(e.pageX + ' , ' + e.pageY); }); - $('.boxType1').on('click', function(){ + $('.boxType1').on('click', function(e){ alert("You can never leave the page"); + e.preventDefault(); + }); + $('.box').on('click', function(){ + $(this).addClass('puppy'); + $('.puppy').css({("background-image": "url('https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRJTJk1vRYIzRaAzigs2A-338F-fi308r2ySl4DqXyzmU56lBSiFPJ9CSw')"}); + }); From 27bd190d499ae8895617792e051e241477d1ae82 Mon Sep 17 00:00:00 2001 From: Anthony Simpson Date: Wed, 17 Feb 2016 09:45:51 -0700 Subject: [PATCH 5/6] everything works --- boxes.js | 16 +++++++++++----- style.css | 4 ++++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/boxes.js b/boxes.js index dd95f46..252555e 100644 --- a/boxes.js +++ b/boxes.js @@ -20,12 +20,18 @@ $(function() { e.preventDefault(); }); $('.box').on('click', function(){ - $(this).addClass('puppy'); - $('.puppy').css({("background-image": "url('https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRJTJk1vRYIzRaAzigs2A-338F-fi308r2ySl4DqXyzmU56lBSiFPJ9CSw')"}); - + $(this).toggleClass('puppy') }); + $('#container').on('click', function(e) { + if(e.target.id === 'container'){ + $(this).css({'background-color': 'lime'}) + } + else { + $(this).css({'background-color': 'black'}) + $(e.target).css({'background-color': 'white'}) + } + }) +}); - -}); // console.log("hello world"); diff --git a/style.css b/style.css index bfbe511..fe462dc 100644 --- a/style.css +++ b/style.css @@ -41,3 +41,7 @@ .boxType3 { background: blue; } + +.puppy { + background-image: url(https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRJTJk1vRYIzRaAzigs2A-338F-fi308r2ySl4DqXyzmU56lBSiFPJ9CSw) +} From 0f09490a207a30d62f31d700734a1b251752cc87 Mon Sep 17 00:00:00 2001 From: Anthony Simpson Date: Thu, 18 Feb 2016 13:25:07 -0700 Subject: [PATCH 6/6] as far as i remember everything should be working right buuuuuuut who knows at this point, no more late pushing i guess... --- boxes.html | 1 + boxes.js | 55 ++++++++++++++++++++++++++++++++++-------------------- 2 files changed, 36 insertions(+), 20 deletions(-) diff --git a/boxes.html b/boxes.html index 673d281..76ea085 100644 --- a/boxes.html +++ b/boxes.html @@ -5,6 +5,7 @@ Boxes! +
diff --git a/boxes.js b/boxes.js index 252555e..4af236a 100644 --- a/boxes.js +++ b/boxes.js @@ -1,37 +1,52 @@ $(function() { - console.log( "ready!" ); - $('#secretBox').on('mouseover', function(){ - $(this).css({'background-color': 'white', 'border-bottom': '4px solid orange'}) + console.log("ready!"); + $('#secretBox').on('mouseover', function() { + $(this).css({ + 'background-color': 'white', + 'border-bottom': '4px solid orange' + }) }).append('

Secret box!

'); - $('#row1 > div').on('mouseover', function(){ + $('#row1 > div').on('mouseover', function() { $(this).addClass('boxType3') }); - $('#row1 > div:last-child').on('mouseover', function(){ - $(this).css({'display': 'none'}) + $('#row1 > div:last-child').on('mouseover', function() { + $(this).css({ + 'display': 'none' + }) + }); + $('.boxType1').css({ + 'background-color': 'white', + 'border-bottom': '1px solid black' + }).append("Click Me") + $('#row2 > div:first-child, #row2 > div:first-child+div').css({ + 'all': 'initial' }); - $('.boxType1').css({'background-color': 'white', 'border-bottom': '1px solid black'}).append("Click Me") - $('#row2 > div:first-child, #row2 > div:first-child+div').css({'all': 'initial'}); // $(" #container > div:not(.row), #container > div:not(#secretBox)").css({'width': '2px'}); $('#container').on('click', function(e) { - console.log(e.pageX + ' , ' + e.pageY); - }); - $('.boxType1').on('click', function(e){ + console.log(e.pageX + ' , ' + e.pageY); + }); + $('.boxType1').on('click', function(e) { alert("You can never leave the page"); e.preventDefault(); }); - $('.box').on('click', function(){ + $('.box').on('click', function() { $(this).toggleClass('puppy') }); - $('#container').on('click', function(e) { - if(e.target.id === 'container'){ - $(this).css({'background-color': 'lime'}) - } - else { - $(this).css({'background-color': 'black'}) - $(e.target).css({'background-color': 'white'}) + $('#container').on('click', function(e) { + if (e.target.id === 'container') { + $(this).css({ + 'background-color': 'lime' + }) + } else { + $(this).css({ + 'background-color': 'black' + }) + $(e.target).css({ + 'background-color': 'white' + }) } }) }); -// console.log("hello world"); +// console.log("hello world"); \ No newline at end of file