#2 of 25 Beginner Projects - HTML, CSS, & JavaScript - Hex Colors ( Responsive Design )

preview_player
Показать описание
How to change the background color on the click of a button?

Try it before you build it ( Hosted with GitHub Pages):

Try it before you build it ( Thumbnail - Gradient Version ):

GitHub Repository ( Don't forget to star !):

GitHub Repository ( Thumbnail - Gradient Version ):

Sponsor me on GitHub!

Follow my blog:

Рекомендации по теме
Комментарии
Автор

Dude this was great, I've been looking for simple JS projects with a walkthrough. Thanks for uploading this and I look forward to more in the future.

brandontate
Автор

Great series, and nice step by step introduction to new features/functions/commands. Thank you

martynaspuotkalis
Автор

Really loving these tutorials man! One constructive criticism is maybe to explain the code part, especially the JavaScript bit. I find if you explain the code more line by line, it would really help newcomers such as myself :D looking forward to more !

amonochromaticpanda
Автор

This has been super helpful with my learning thank you so much!

Ceweina
Автор

Your work is extremely helpful to me! Thank you!

vladimirtsyganok
Автор

Why change color function is working because this function is not called. You only made function named changeColor

ReasoningBanking
Автор

Yeah man you go fast but I’m still learning so I’m pretty slow.
I did have some user error due to your speed I didn’t include a set of () but debugging is a natural part of coding so….I found it lol.
Good job man. These are fun tutorials.

Vibesire
Автор

fantastic, i did evrything but my background does not change, only the hex code changes

ekhatorcourage
Автор

I finally got the project working after I my error. The error was that I neglected to place a semicolon after: hexcode += hex_numbers[random_index] - once placing the semicolon correctly: hexcode += hex_numbers[random_index]; - the project worked. I was using the video for my code and in the video no semicolon is used. I'm still a bit puzzled why your code worked in the video without the semicolon? See 21.51 in your video.

chrisw
Автор

Same as your last video, when I click the 'Click me' button, the colours don't change? Nothing happens

lachiemiles
Автор

hey, very nice project, thanks alot for showing this procedure!
considering the hex-code, i wonder why we loop 6 times over the hex_numbers array when in our html file there are only 5 0000 before the #?

schmonk
welcome to shbcf.ru