web前端|js教程
jquery,二级菜单,jquery菜单
web前端-js教程
本文实例讲述了jquery实现的简单二级菜单效果代码。分享给大家供大家参考。具体如下:
手机小说app 源码,vscode如何暂停训练,ubuntu的dd,tomcat 多域名映射,爬虫养成游戏,php 图片详细信息,灰帽seo有哪些技术,手机免费搭建网站源码,淘宝界面模板lzw
这是一款基于jquery实现的二级菜单,研究了这么多天,才学会用jquery写一个菜单,也算是对自己的鼓励吧,自我感觉这个菜单很不错,欢迎朋友们指点江山。
易语言ip转向源码,ubuntu中安装驱动,爬虫实现自动搜索,php fread,seo高级经理lzw
运行效果截图如下:
源码编写,vscode 入门使用,ubuntu终端被占用,Tomcat结构项目,sqlite 日期转化,自适应插件,tp5 前端框架,黑猫投诉爬虫,框架 php,seo 赚钱,emlog博客网站源码,网页的flash代码,36氪 wordpress 模板,网页页面出现loading,asp通用进销存管理系统,网站小偷程序防止lzw
在线演示地址如下:
/js//jquery-simple-2l-menu-style-demo-codes/
具体代码如下:
jquery二级菜单$(function(){ $("#container .menu1 ul li").click(function(){ var index=$("#container .menu1 ul li").index(this); $(this).addClass("bg").siblings().removeClass(); $("#container .menu2 ul li ul").eq(index).show().parent().siblings("li").children("ul").hide(); })}) body{ margin:0; padding:0; font-family:"宋体"; font-size:9pt; color:#FFFFFF; font-weight:bold}#container{ width:800px; height:auto; margin:0 auto; border:1px #1025c0 solid} #container .menu1{ width:800px; height:40px; border:none; background:url(images/menu1.jpg) no-repeat} #container .menu1 ul{ margin:0; padding:0; position:relative; padding-top:5px;} #container .menu1 ul li{ float:left; padding-left:10px; height:35px; width:80px; line-height:35px; list-style:none; text-align:center; cursor:pointer} #container .menu2{ width:800px; height:35px; border:none; background-color:#333333;} #container .menu2 ul{ margin:0; padding:0} #container .menu2 ul li{ height:35px; line-height:35px; list-style:none; float:left; cursor:pointer} #container .menu2 ul li ul li{ float:left; padding-left:20px; height:35px; line-height:35px; list-style:none} .bg{ background-color:#333333} .hide{ display:none}
第一栏第二栏第三栏第四栏第五栏
第一栏第一栏第一栏第二栏第二栏第二栏第三栏第三栏第三栏第四栏第四栏第四栏第五栏第五栏第五栏