From 982be57ecacfd86f87b217b84fce53a6f60a6efd Mon Sep 17 00:00:00 2001 From: *anna* Date: Thu, 11 Mar 2021 15:44:50 +0100 Subject: [PATCH] w --- pizzagate/wayfair.css | 35 -------------------------------- pizzagate/wayfair.html | 46 ------------------------------------------ pizzagate/wayfair.js | 39 ----------------------------------- wayfair/wayfair.html | 3 ++- wayfair/wayfair.js | 30 +++++++++++++++++++++++++++ 5 files changed, 32 insertions(+), 121 deletions(-) delete mode 100644 pizzagate/wayfair.css delete mode 100644 pizzagate/wayfair.html delete mode 100644 pizzagate/wayfair.js diff --git a/pizzagate/wayfair.css b/pizzagate/wayfair.css deleted file mode 100644 index 39cb2fc..0000000 --- a/pizzagate/wayfair.css +++ /dev/null @@ -1,35 +0,0 @@ -div.figure1 { - position:absolute; - left: 15%; - top: 15%; -} - -div.figure2 { - position:absolute; - left: 70%; - top: 30%; -} - -div.figure3 { - position:absolute; - right: 10%; - top: 75%; -} - -div.figure4 { - position:absolute; - left: 50%; - top: 50%; -} - -div.figure5 { - position:absolute; - left:45%; - top: 10%; -} - -div.figure6 { - position:absolute; - left:10%; - bottom: 15%; -} \ No newline at end of file diff --git a/pizzagate/wayfair.html b/pizzagate/wayfair.html deleted file mode 100644 index 9e226fd..0000000 --- a/pizzagate/wayfair.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - wayfair - - - - -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- - - - - - - - - \ No newline at end of file diff --git a/pizzagate/wayfair.js b/pizzagate/wayfair.js deleted file mode 100644 index 5e39d6c..0000000 --- a/pizzagate/wayfair.js +++ /dev/null @@ -1,39 +0,0 @@ -$(document).ready(function() { - - $("#forniture1").hover( - function(){ $("#forniture1").hide()}, - function(){ $("#child1").show() - }); - - $("#forniture2").hover( - function(){ $("#forniture2").hide()}, - function(){ $("#child2").show() - }); - - $("#forniture3").hover( - function(){ $("#forniture3").hide()}, - function(){ $("#child3").show() - }); - - $("#forniture4").hover( - function(){ $("#forniture4").hide()}, - function(){ $("#child4").show() - }); - - $("#forniture5").hover( - function(){ $("#forniture5").hide()}, - function(){ $("#child5").show() - }); - - $("#forniture6").hover( - function(){ $("#forniture6").hide()}, - function(){ $("#child6").show() - }); - - - - - - - - });; \ No newline at end of file diff --git a/wayfair/wayfair.html b/wayfair/wayfair.html index eb3a0e6..f52914e 100644 --- a/wayfair/wayfair.html +++ b/wayfair/wayfair.html @@ -7,7 +7,8 @@
- score:
+ score:0/6 +
diff --git a/wayfair/wayfair.js b/wayfair/wayfair.js index ed40f89..2c37f6b 100644 --- a/wayfair/wayfair.js +++ b/wayfair/wayfair.js @@ -1,12 +1,15 @@ + $(document).ready(function() { var counter = 0; + $("#forniture1").click(function(){ counter ++; $('#result').html(counter); $("#forniture1").hide(); $("#child1").show(); + winning(); }); $("#forniture2").click(function(){ @@ -14,6 +17,7 @@ $(document).ready(function() { $('#result').html(counter); $("#forniture2").hide(); $("#child2").show(); + winning(); }); $("#forniture3").click(function(){ @@ -21,6 +25,7 @@ $(document).ready(function() { $('#result').html(counter); $("#forniture3").hide(); $("#child3").show(); + winning(); }); $("#forniture4").click(function(){ @@ -28,6 +33,7 @@ $(document).ready(function() { $('#result').html(counter); $("#forniture4").hide(); $("#child4").show(); + winning(); }); $("#forniture5").click(function(){ @@ -35,6 +41,7 @@ $(document).ready(function() { $('#result').html(counter); $("#forniture5").hide(); $("#child5").show(); + winning(); }); $("#forniture6").click(function(){ @@ -42,7 +49,30 @@ $(document).ready(function() { $('#result').html(counter); $("#forniture6").hide(); $("#child6").show(); + winning(); }); + + function winning() { + if (counter === 6) { + $('#win').html("you won!"); + //alert ("you won"); + + } }; + + + + });; + +/*(function() { + if (counter === 6) { + //$('#winmessage').html("you won!"); + alert ("you won"); + + } }); + +if (counter == 1) { + console.log ("you won"); +}*/ \ No newline at end of file