Skip to content

tariq-k-dev/dj-javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Use JavaScript event listeners to change the color of a square. Each event listener has a color associated with it. All the event listeners are triggered by having the mouse pointer in the square, except for scroll event, which is triggered by scrolling outside of the square setting the square color to orange

  • mouseover gives the square a background color of blue
  • mouseout will remove all background colors from the square
  • mousedown changes the square color to red
  • mouseup changes the square color to yellow
  • dblclick changes the square color to green

Additionally, by pressing the following keys will set the color of the square:

  • b - blue

  • g - green

  • o - orange

  • r - red

  • y - yellow

About

JavaScript event listeners used to manipulate DOM element colors

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published