Skip to content

Commit

Permalink
updated carousel
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulaBannerman committed Nov 27, 2024
1 parent 000f9db commit 534f2b4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions assets/js/carousel.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,21 @@ function sortPositioning(mainScreen, leftScreen, rightScreen) {
leftScreen = screenStore[numOfScreens - 1];
}
screenStore.forEach(screen => {
//set tabindex to -1
screen.tabIndex = -1
function changingChildren(tabIndexNumber){
let childrenOfScreen = screen.querySelectorAll("a")
console.log(childrenOfScreen)
childrenOfScreen.forEach(child => {
child.tabIndex = tabIndexNumber
});
}
changingChildren(-1)

if(screen === mainScreen){
//set the tab index to 0
screen.tabIndex = 0
changingChildren(0)
screen.style.display = "block";
screen.style.left = "0px";
}else if (screen === leftScreen){
Expand Down

0 comments on commit 534f2b4

Please sign in to comment.