jQuery is an easy way to implement the gradient drop down menu

  • 2020-05-12 02:14:28
  • OfStack

This article illustrates a simple way for jQuery to implement the gradient drop-down menu. Share with you for your reference. The specific implementation method is as follows:

<script type="text/javascript">
    $(function(){
        $("#nav li").hover(function(){if(!$(this).children("#nav li ul").is(":animated")){$(this).children("#nav li ul").fadeIn("100");}},function(){$(this).children("#nav li ul").fadeOut("400");});//willin
    })
</script>
#nav li {float:left; line-height:2em; margin:5px 0 5px 5px;}
#nav li ul {position:absolute;    **display:none;**     z-index:9999;width:150px; left:-999em;margin:0; background:#C00;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;box-shadow:0 0 15px #F63;-moz-box-shadow:0 0 15px #F63;-webkit-box-shadow:0 0 15px #F63;}

I hope this article has been helpful to your jQuery programming.


Related articles: