javascript add class on hover

3. what i want is when you hover over a list item, then there’s the hover color, then when you click i have a div appear (sliding down) then i want the LI #Show to have a yellow background-color then when clicked again the div goes away Display:hidden) and then i want the LI#Show to go back to its regular. This collection of hover effects is proof that you don’t need to be over-the-top in order to make a strong impression. The :hover CSS pseudo-class matches when the user interacts with an element with a pointing device, but does not necessarily activate it. Tip: Learn more about the className property in our JavaScript Reference. popper class selector, the "div#pop" is shown. This will work in any browser on any element, to support styling changes on hover. To add an additional class to an element: To add a class to an element, without removing/affecting existing values, append a space and the new classname, like so: document.getElementById("MyElement").className += " MyClass"; To change all classes for an element: To replace all existing classes with one or more new classes, set the className. JQuery: