I use the (hover) function to make a DIV appear, I wanted to know if I can make it appear when I right click. That is, a child DIV appears when I click a parent DIV with the right button.
Here's an example I'm trying here.
.pagina {
width: 200px;
margin-left: 119px;
}
#cssmenu ul,
#cssmenu li,
#cssmenu span,
#cssmenu a {
list-style-type: none;
margin: 0;
padding: 0;
position: relative;
text-decoration: none;
}
#cssmenu a {
line-height: 40px;
}
#cssmenu > ul > li:hover:after {
content: '';
position: absolute;
top: 30px;
left: 0;
display: block;
width: 0;
height: 0;
bottom: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 10px solid #484848;
margin-left: 6px;
}
#cssmenu .has-sub:hover > ul {
display: block;
}
#cssmenu .has-sub ul {
display: none;
width: 150px;
margin-left: -119px;
position: absolute;
z-index: 3;
}
#cssmenu .has-sub ul li a {
background: #000;
border-bottom: 1px solid #d7d7d7;
display: block;
line-height: 120%;
padding: 10px;
color: #ffffff;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
overflow: hidden;
}
#cssmenu .has-sub ul li:hover a {
background: #1E90FF;
}
<div class='pagina'>
<div id='cssmenu'>
<ul>
<li class='has-sub'><a href='#'>x</a>
<ul>
<li><a class='onclick' onclick='document.location="google.com.br";}'><b>link1</b></a></li>
<li><a class='onclick' onclick='document.location="google.com.br";}'><b>link1</b></a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class='pagina'>
<div id='cssmenu'>
<ul>
<li class='has-sub'><a href='#'>x</a>
<ul>
<li><a class='onclick' onclick='document.location="google.com.br";}'><b>link1</b></a></li>
<li><a class='onclick' onclick='document.location="google.com.br";}'><b>link1</b></a></li>
</ul>
</li>
</ul>
</div>
</div>