Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsajadpp committed Jan 9, 2024
1 parent 9f5c3fd commit ff62ffc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<li>
<a href="">
<button class="active">
<span class="material-icons">
<span class="material-icons-outlined">
home
</span>
</button>
Expand Down Expand Up @@ -165,7 +165,7 @@
<li>
<a href="/">
<button class="active">
<span class="material-icons">
<span class="material-icons-outlined">
home
</span>
<span class="menu-name">Home</span>
Expand Down
10 changes: 10 additions & 0 deletions src/js/script.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Get all the buttons with the specified class
const buttons = document.querySelectorAll('.menu-bar .menu-group ul li a button');
const activeBtn = document.querySelectorAll('.active');

// Iterate through each button and add event listeners
buttons.forEach(button => {
Expand All @@ -21,6 +22,15 @@ buttons.forEach(button => {

});

activeBtn.forEach(button => {
if (button.classList.contains('active')) {
const icon = button.querySelector('.material-icons-outlined');
icon.classList.remove('material-icons-outlined');
icon.classList.add('material-icons');
}

});

const footerBtn = document.querySelectorAll('footer ul li a button');

footerBtn.forEach(button => {
Expand Down
4 changes: 2 additions & 2 deletions trending.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<li>
<a href="">
<button>
<span class="material-icons">
<span class="material-icons-outlined">
home
</span>
</button>
Expand Down Expand Up @@ -165,7 +165,7 @@
<li>
<a href="/">
<button>
<span class="material-icons">
<span class="material-icons-outlined">
home
</span>
<span class="menu-name">Home</span>
Expand Down

0 comments on commit ff62ffc

Please sign in to comment.