From 2093e49b367959d9e14acd0feec2162c5df62f2e Mon Sep 17 00:00:00 2001 From: Umar Khursheed <137692710+umarsayed12@users.noreply.github.com> Date: Tue, 7 May 2024 16:57:29 +0000 Subject: [PATCH] Color_picker updated --- DOM_projects/color_picker.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DOM_projects/color_picker.js b/DOM_projects/color_picker.js index 29b639e..e4c14ef 100644 --- a/DOM_projects/color_picker.js +++ b/DOM_projects/color_picker.js @@ -7,4 +7,9 @@ buttons.forEach((button) => { button.style.height = "150px"; button.style.width = "150px"; }); + button.addEventListener('mouseout',(e) => { + body.style.backgroundColor = e.target.id; + button.style.height = "100px"; + button.style.width = "100px"; + }); }); \ No newline at end of file