From 097a8db09c4dd128f9024a9580c11292fff964ae Mon Sep 17 00:00:00 2001 From: Imbus Date: Wed, 1 Nov 2023 10:58:12 +0100 Subject: [PATCH] Move js out of html --- index.htm | 9 +-------- script.js | 6 ++++++ 2 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 script.js diff --git a/index.htm b/index.htm index b8df94d..850e572 100644 --- a/index.htm +++ b/index.htm @@ -1,12 +1,5 @@ - + TC Automotives diff --git a/script.js b/script.js new file mode 100644 index 0000000..ba486e1 --- /dev/null +++ b/script.js @@ -0,0 +1,6 @@ +function expand() { document.getElementById("bar").style.height = "100%"; } +function collapse() { document.getElementById("bar").style.height = "0px"; } +function myFunction() { + if (document.getElementById('bar').clientHeight == 0) { expand(); } + else { collapse(); } +} \ No newline at end of file