Set element style to the :hover style using jQuery
- by Baddie
Is it possible (using jQuery or otherwise) to set the style of a certain element to the :hover style defined in a stylesheet?
.regStyle {
background-color: #000;
}
.regStyle:hover {
background-color: #fff;
}
Trying it out
$("#differentButton").click(function(){
// this doesn't work
$("#someElement").addClass("regStyle:hover").remove("regStyle");
});