I have read quite a few articles but still couldn't figure out. Tried lots of methods they provided but still no luck.
I have this in my html
<a href="report.html" class="btn btn-success btn-lg">Button 1</a>
this is what happens to css when hovered
.btn-success:hover,
.dropdown-toggle.btn-success {
background-color: yellow;
}
I want to change the background color to blue using js.
I did not know why you turn to js as css is the best choice for what you need. I guess you might find the css for the link is somehow "tricky": it needs to written in the order of "lvha", i.e. a:link, a:visited, a:hover and a:active