I have a div
that has hover:
.div {
// css
}
.div:hover {
// css
}
But I want to disable the hover when you click on the div
.
I have a div
that has hover:
.div {
// css
}
.div:hover {
// css
}
But I want to disable the hover when you click on the div
.
All you need is this:
Try this:
JQUERY
CSS
Try like this:
JSFIDDLE DEMO
Option 1. The Javascript solution
Simply add a class prohibiting the application of hover styling on click:
Option 2. The CSS solution
Alternatively, in pure CSS (although without rule persistence)