boredbutton3

Log | Files | Refs | README

commit 87cb112e3e2549e22b709e4caa128a4dfee210e5
parent 06cbc7525c5dcab83f07045c91467b8b16abc080
Author: William Lindholm <william_lindholm@outlook.com>
Date:   Fri, 17 Dec 2021 22:13:10 +0100

Added move button function

Diffstat:
Mindex.html | 4++--
Mscript.js | 4++++
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/index.html b/index.html @@ -16,8 +16,8 @@ <p class="headline">BOREDBUTTON<sup>3</p> </div> - <div class="main" id="main" onclick="showFact()"> - </div> + <div class="main" id="main" onclick="showFact()"></div> + </body> diff --git a/script.js b/script.js @@ -1,4 +1,5 @@ function showFact() { + moveButton(); console.log("running function") const xhttp = new XMLHttpRequest(); xhttp.onload = function() { @@ -8,6 +9,9 @@ function showFact() { xhttp.send(); } +function moveButton() { + document.getElementById("main").style.bottom = "35%"; +} var canvas = document.getElementById('bang'),