I have a style:
.web_show_webcam:hover{color:#000;background:#fff;}
How to attach this css to element using JQuery? This way doesn't work:
$(".web_show_webcam").addClass("web_show_webcam:hover");
I have a style:
.web_show_webcam:hover{color:#000;background:#fff;}
How to attach this css to element using JQuery? This way doesn't work:
$(".web_show_webcam").addClass("web_show_webcam:hover");
You can try like this:
$(".web_show_webcam").hover(function() {
$(this).css("background-color","red")
});
$('#btn').mouseover(function(e){
$(this).addClass('hoverState');
}).mouseout(function(e){
$(this).removeClass('hoverState');
});
try
JSFiddle