Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

menu project #141

Open
Nourhan721 opened this issue Feb 8, 2024 · 1 comment
Open

menu project #141

Nourhan721 opened this issue Feb 8, 2024 · 1 comment

Comments

@Nourhan721
Copy link

hi I was doing the menu project and everything was going okay until i reached the for each part i wrote the code but nothing happened so i don't know where i went wrong . here's the code:

filterBtns.forEach(function (btn){
  btn.addEventListener('click',function(e){
  console.log(e.currentTarget.dataset) 
})
})
@hussainabid7199
Copy link

Filter 1
Filter 2
Filter 3
Filter 4

<script> const filterBtns = document.querySelectorAll('.filter-btn'); filterBtns.forEach((btn) => { btn.addEventListener("click", (e) => { console.log(e.currentTarget.dataset); }); }); </script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants