From 99ae9d6cbcdea4cfa08bb3dd6526a987d5d5ae80 Mon Sep 17 00:00:00 2001 From: lazy29 <123200972+lazy29@users.noreply.github.com> Date: Tue, 7 Nov 2023 00:52:48 +0530 Subject: [PATCH] slider bug fix slider has an bug, if we first use dot buttons then arrow buttons or arrow keyboards events not working correctly. this one line can fix it. --- 13-Advanced-DOM-Bankist/final/script.js | 1 + 1 file changed, 1 insertion(+) diff --git a/13-Advanced-DOM-Bankist/final/script.js b/13-Advanced-DOM-Bankist/final/script.js index a0015c55ee..c7ffdc2685 100644 --- a/13-Advanced-DOM-Bankist/final/script.js +++ b/13-Advanced-DOM-Bankist/final/script.js @@ -285,6 +285,7 @@ const slider = function () { const { slide } = e.target.dataset; goToSlide(slide); activateDot(slide); + curSlide = +slide; } }); };