Answer the question
In order to leave comments, you need to log in
How to make a popover menu?
How to make such a dropdown menu without ul-li?
www.designchemical.com/lab/jquery-vertical-mega-me...
This is in jquery\javascript, how to do it?
Answer the question
In order to leave comments, you need to log in
Do you care about tags? Well don't like ul > li make div > div.
The most trivial code would be something like this:
<div class="menu-item">
<a href="#">menu name</a>
<div class="sub-menu">
sub menu content
</div>
</div>
<div class="menu-item">
<a href="#">menu name</a>
<div class="sub-menu">
sub menu content
</div>
</div>
<div class="menu-item">
<a href="#">menu name</a>
<div class="sub-menu">
sub menu content
</div>
</div>
<script>
jQuery(document).ready(function($){
$('.menu-item').hover(
function(){
$(this).find('.sub-menu').show();
},
function(){
$(this).find('.sub-menu').hide();
}
);
});
</script>
<style>
.sub-menu{
display:none;
}
</style>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question