How to make an image button that changes the background color and making the inversion of elements?

I need to make a button that changes the background color to #e5e5e5 at #202020 and button did a color inversion in the rest of the items (via a filter). If it can be done without a third-party framework, it's very good, because I don't have the skills Bootstrap, etc.
April 7th 20 at 10:50
1 answer
April 7th 20 at 10:52
Solution
Make the button. Hang the onclick event handler. In the handler, or change the styles directly. Either modify the element classes, for these classes of writing styles.
https://learn.javascript.ru/styles-and-classes
Thank you! Can throw me the link with this code from JSFiddle or CodePen? I'm just a beginner and do not quite understand your answer :D - Vito48 commented on April 7th 20 at 10:55
@Vito48, $40 - quentin.Kli commented on April 7th 20 at 10:58
@quentin.Kli, ? - Vito48 commented on April 7th 20 at 11:01
@Vito48, You asked "How to do?" I answered as. You asked "Do", I replied that I don't work for free. $20/hour. - quentin.Kli commented on April 7th 20 at 11:04
@quentin.Kli, of course - Vito48 commented on April 7th 20 at 11:07
You need to read about functions and event handlers, also about the change classes of an element through js, or change css properties of an element, it is not difficult to write one of the two proposed functions and to launch it when you click, very simple - kaley.Nicolas commented on April 7th 20 at 11:10

Find more questions by tags CSSJavaScript