From d52f88100f73f0700c3276b78241a74dc11dda25 Mon Sep 17 00:00:00 2001 From: *anna* Date: Mon, 8 Mar 2021 17:13:53 +0100 Subject: [PATCH] yes --- script.js | 42 +++++++++++++++++++----------------------- start.html | 11 +++++++---- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/script.js b/script.js index cc88437..dba351c 100644 --- a/script.js +++ b/script.js @@ -18,34 +18,30 @@ $(document).ready(function() { $("#readme_4").show(); }); - - - - - });; +$(document).ready(function() { +$("#switchTo2_newspaper").click (function(){ + $("#2_park_newspaper").show(); + $("#1_park").hide(); +}); +$("#switchTo1_news").click (function(){ + $("#1_park").show(); + $("#2_park_newspaper").hide(); + $("#readme_1,#readme_2,#readme_3,#readme_4").hide(); +}); -/*go back+go forward buttons - function goBack() { - window.history.back(); - } - function goForward() { - window.history.go(1); - } - */ - - - -//to switch divs inside the container div +$("#switchTo2_walk").click (function(){ + $("#2_park_walk").show(); + $("#1_park").hide(); +}); - function show(param_div_id) { - document.getElementById("container").innerHTML = document.getElementById(param_div_id).innerHTML; - } + $("#switchTo1_walk").click (function(){ + $("#2_park_walk").hide(); + $("#1_park").show(); +}); - function goBack(){ - document.getElementById("2_park_newspaper").style.visibility = "hidden"; - } +});; diff --git a/start.html b/start.html index 6476502..4c5e761 100644 --- a/start.html +++ b/start.html @@ -6,23 +6,24 @@ - +
It's Sunday. You are sit on a bench in the park. Your friend seems to be really late. You need a way to kill time until she arrives. - You can either that someone left on the bench or . + You can either that someone left on the bench or . there if you feel like it .
- +