Consider following HTML, I have a div class magic inside main. The magic class is hidden by default (with CSS display:none). I want to show the div class magic if the mouse goes anywhere in the main div. Can this be done with CSS only? or it has to use jQuery?
<div class="main">
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<div class="magic">
Hello, world
</div>
</div>
CSS:
.main{
width: 400px;
border:1px solid red;
}
.magic{
display:none;
margin-top:10px;
background:yellow;
padding:5px;
}
jsFiddle: http://jsfiddle.net/uRrn8/1/
Thanks for any help.