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

#1 not an issue #53

Open
kupendrav opened this issue Apr 26, 2024 · 0 comments
Open

#1 not an issue #53

kupendrav opened this issue Apr 26, 2024 · 0 comments

Comments

@kupendrav
Copy link

ji sir aapne tho kamal ki kaam kar rahe hai
mein apke js playlist tho 80% complete karke ye lag raha hai mein js mein full confident hun

waise playlist mein projects video mein 1) project color change ka apne har ek color ko target karke background change kar rahe hai
tho maine socha
chalo color naam ki variable mein sabhi hojai

let buttons = document.querySelectorAll('.button')

let body = document.querySelector('body')

buttons.forEach((btn)=>{
  btn.addEventListener('click',(e)=>{
    let color = e.target.id
    body.style.backgroundColor = color
  })
});```
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

1 participant