Skip to content

mohammedsalah7/crazy-colors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Events Exercises

The aim of this exercise is to let you use your DOM events ('click', 'change') understanding to do some DOM manipulation. Remember to always use console.log to understand how things work.

  • Add the necessary code to change the color of #pallete div Randomly:

    • Clicking choose random color should choose a random color from colors array in js/index.js and apply it to the #pallete background-color.

    look for how to manipulate the style of a DOM element.

    this may help with the getting the random index.

  • Add the necessary code to change the color of #pallete div based on the #color input value:

    • When the user type a hexa color code inside #color input, should apply the color to the #pallete background-color.

    look for change or input event and how it's used and choose what suits you best, also remember to find a way to get the value that the user type inside the input, console.log(event.target); may help you.

  • Extra:

    • Also apply the color to the input font when the use type a hexa color isnide the input.
    • Insert the random hexa color code inside the input programaticly when the user click on choose random color.

Please, do not hisitate to ask/help others. Me and Hashem are always online to provide the suport.

And Have fun please.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published