I am facing an issue with displaying different text on mouseover for three buttons. I successfully implemented it for one button, but when I added the other two, it stopped working. Here is the code I used for the first button:
Using jQuery-
document.getElementById('description-text').style.display="none";
$("#description-button").on("mouseenter",function()
{
$("#description-text").fadeIn("slow");
});
$("#description-button").on("mouseleave",function()
{
$("#description-text").fadeOut("slow");
});
CSS Code-
#description-text {
padding: 10px;
float: left;
width: 60%;
}
#description-button {
border-radius: 100%;
border: 1px solid #aaa;
width: 10px;
height: 10px;
margin-top: 10px;
position: absolute;
left: 200px;
-moz-transition-duration: 0.5s;
-o-transition-duration: 0.5s;
-webkit-transition-duration: 0.5s;
transition-duration: 0.5s;
}
#description-container {
z-index: 1;
float: left;
overflow: hidden;
width: 70%;
background: transparent;
}
#description-button:hover {
background-color: #99daea;
-moz-transition-duration: 0.5s;
-o-transition-duration: 0.5s;
-webkit-transition-duration: 0.5s;
transition-duration: 0.5s;
}
HTML Markup-
<!--description-->
<div id="description-container">
<div id="description-button"></div>
<div id="description-text">
this is a description.
</div><!--tab-text-->
</div><!--description-container-->
The code for the other two buttons is identical, with only the id names and button positioning changed. The text for the first button disappears, but I cannot get it to appear on mouseover. The text for the other buttons does not disappear at all. You can view the issue here.