I don't see why this doesn't work - any help? I want it to pop up as I hover over the .hoveroverme div
jQuery
$(document).ready(function(){
$(".hoveroverme").hover(
function(){
$('.popupbox').addClass('popupnobox');},
function(){
$('.popupbox').removeClass('popupnobox'); }
);
CSS
.popupnobox{
visibility: hidden;
opacity: 100;
}
.popupbox{
background-color:magenta;
box-shadow: 1px 1px 3px 3px;
width:500px;
height:400px;
border:2px solid black;
justify-content: center;
align-content: center;
margin:0 auto;
}
.hoveroverme{
background-color:green;
}
HTML
<div class="hoveroverme">Hover Over Me!</div>
<div class="popupbox"></div>
I guess you have defined the
popupnoboxcss class other way round. As per my understanding; initiallypopupboxshould be invisible and whenever we hover over thehoveroverme; then only it should be made visible as follows: