diff --git a/index.html b/index.html index ad32e83..674ca26 100644 --- a/index.html +++ b/index.html @@ -10,9 +10,10 @@

Nathan3-14's Github Page

- - - +
+
+
+
diff --git a/script.js b/script.js index e991415..482295f 100644 --- a/script.js +++ b/script.js @@ -1,9 +1,10 @@ var elements = document.getElementsByClassName("link") -for (i=0; i location.assign(element.id) -} -/* -document.getElementById('menu').onclick = () => location.assign('menu'); -document.getElementById('bcp-shop').onclick = () => location.assign('bcp-shop'); -*/ \ No newline at end of file + console.log(element.id) + element.addEventListener("click", (event) => { + var button = event.target + location.assign(button.id) + }) +} \ No newline at end of file diff --git a/style.css b/style.css index c976fce..f052b2b 100644 --- a/style.css +++ b/style.css @@ -19,4 +19,14 @@ body { @keyframes pan { from {background-position: 0%;} to {background-position: -200%;} -} \ No newline at end of file +} + +button { + width: 100px; + background-color:cornflowerblue; + transition: width 0.4s, background-color 0.4s; +} +button:hover { + width: 150px; + background-color:cadetblue; +} diff --git a/test.html b/test.html new file mode 100644 index 0000000..5f7f8d7 --- /dev/null +++ b/test.html @@ -0,0 +1,27 @@ + + + + + + Button Self Reference + + + + + + + + + + +