From dcb36a51468d2d1176fe584563f0ea69001c7169 Mon Sep 17 00:00:00 2001 From: Vincent Arel-Bundock Date: Fri, 28 Jul 2023 22:15:20 -0400 Subject: [PATCH] toggle --- book/articles/toggle-tabs.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/book/articles/toggle-tabs.html b/book/articles/toggle-tabs.html index 33a8140e2..e4c7b2a35 100644 --- a/book/articles/toggle-tabs.html +++ b/book/articles/toggle-tabs.html @@ -40,6 +40,10 @@ } } }); + const r_button = document.querySelector('#toggleRCodeButton'); + const python_button = document.querySelector('#togglePythonCodeButton'); + r_button.style.backgroundColor = 'lightgray'; + python_button.style.backgroundColor = 'white'; }; function toggle_python() { @@ -69,6 +73,10 @@ } } }); + const r_button = document.querySelector('#toggleRCodeButton'); + const python_button = document.querySelector('#togglePythonCodeButton'); + r_button.style.backgroundColor = 'white'; + python_button.style.backgroundColor = 'lightgray'; }; window.document.addEventListener("DOMContentLoaded", function (event) { @@ -82,6 +90,7 @@ const r_button = document.createElement('button'); r_button.id = 'toggleRCodeButton'; + r_button.style.backgroundColor = 'lightgray'; r_button.textContent = 'R'; r_button.style.width = '80px'; r_button.addEventListener('click', toggle_r);