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

Add my project #1079

Conversation

LakshyaMalik
Copy link
Contributor

@LakshyaMalik LakshyaMalik commented Oct 29, 2023

Developer Checklist

  • [ v] Followed guidelines mentioned in the readme file.
  • [ v] Followed directory structure. (e.g. ProjectName/{USERNAME}/...yourfiles)
  • [ v] Starred ⭐ the Repo (Optional)

Summary

I used JavaScript DOM Manipulation to perform this task.

first i created a container and styled everything by setting up off bulb image and toggle button svgs
then i creating an onclick event for the button.
which triggers the ToggleBulb() function
the function stores the image source in a variable Bulb and then compares it using match operator to know whether the image is of bulb on or bulb off and then changes the source using setAttribute accordingly.

Screenshot

attach screenshots/gifs here

Screenshot 2023-10-29 190312
Screenshot 2023-10-29 190329

Live Project Link

add a working project link here

https://bulb-on-off-js-miniproject-2k5y1sno4-lakshyamalik.vercel.app/

@NitkarshChourasia NitkarshChourasia merged commit 945fa3a into thinkswell:master Jan 11, 2024
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

Successfully merging this pull request may close these issues.

2 participants