Add class to .hover functionality on a specific class name - jQuery
Posted
by marcamillion
on Stack Overflow
See other posts from Stack Overflow
or by marcamillion
Published on 2010-05-04T23:20:15Z
Indexed on
2010/05/04
23:28 UTC
Read the original article
Hit count: 303
So, throughout my entire document, I would like for every single time the user hovers over an element with a specific class name, I would like a class to be added.
My CSS looks like this:
.hotspot:hover, .hotspothover
{
border: 4px solid #fff;
box-shadow: 0px 0px 20px #000;
-webkit-box-shadow: 0px 0px 20px #000;
-moz-box-shadow: 0px 0px 20px #000;
z-index: 1;
}
Class name: "hotspot".
I tried this, but it doesn't seem to work:
$("#hotspot.hover #hotspothover").addClass("bubble bottom");
Thanks.
© Stack Overflow or respective owner