转自:http://www.cnblogs.com/clc2008/archive/2011/10/25/2223254.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="js/jquery-1.6.4.min.js"></script>
<style type="text/css">
#myul{ width:504px;}
#myul li { list-style:none;border:1px solid #96C2F1; padding:1px;}
#myul li span{ list-style:none; background:#B2D3F5; width:480px; height:20px; display:block; padding-left:20px; }
#myul li span.hand{ cursor:pointer;background:#B2D3F5 url(img/right.gif) no-repeat 5px center;}
#myul li span.current{ background:#b2d300 url(img/down.gif) no-repeat 5px center; }
#myul li div{ background:#EFF7FF;width:490px; padding:0px 5px 5px 5px; } </style>
<script type="text/javascript">
$(function () {
$("#myul li div").hide();
$("#myul li span").addClass("hand");
$("#myul li span").click(function () {
$(this).toggleClass("current");
$(this).parent().siblings().find("span").removeClass("current");
$(this).parent().find("div.hid").slideToggle("fast");
$(this).parent().siblings().find("div").slideUp("fast");
});
})
</script>
</head>
<body>
<ul id="myul">
<li><span>第一级菜单</span>
<div class="hid">
<p>武器哦的撒旦法发生的撒旦法打撒旦法 <br />asdfasfdasfd</p>
<p>武器哦的撒旦法发生的撒旦法打撒旦法 <br />asdfasfdasfd</p>
</div> </li>
<li><span>第二级菜单</span>
<div class="hid">武器哦的撒旦法发生的撒旦法</div> </li>
<li><span> 第三级菜单</span>
<div class="hid">
<p>武器哦的撒旦法发生的撒旦法打撒旦法asdfasfdasfd</p>
<p>武器哦的撒旦法发生的撒旦法打撒旦法 <br />asdfasfdasfd</p>
<p>武器哦的撒旦法发生的撒旦法打撒旦法asdfasfdasfd</p>
<p>武器哦的撒旦法发生的撒旦法打撒旦法 <br />asdfasfdasfd</p>
</div>
</li>
</ul>
</body>
</html>

【转】Jquery折叠效果的更多相关文章

  1. jQuery文本段落展开和折叠效果

    <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/h ...

  2. BootStrap入门教程 (四) :JQuery类库插件(模态窗口,滚动监控,标签效果,提示效果,“泡芙”效果,警告区域,折叠效果,旋转木马,输入提示)

    上讲回顾:Bootstrap组件丰富同时具有良好可扩展性,能够很好地应用在生产环境.这些组件包括按钮(Button),导航(Navigation),缩略图( thumbnails),提醒(Alert) ...

  3. jQuery 文本段落展开和折叠效果

    jQuery 文本段落展开和折叠效果 <!DOCTYPE html> <head> <meta http-equiv="Content-Type" c ...

  4. [jquery]折叠指定条件的表格

    最近在做财务报表时候,一些表格要做特定折叠效果 这里通过2个自定义属性来对表格之间的属性作关联 date-head和date-num,输出表格时候,可以按照这2个自定义属性给某些带父子层级关系的内容指 ...

  5. jquery-练习-折叠效果

    <!DOCTYPE html > <html xmlns="http://www.w3.org/1999/xhtml"> <head> < ...

  6. 淡入淡出(折叠效果)and点击切换背景图片

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  7. Vue 实现展开折叠效果

    Vue 实现展开折叠效果 效果参见:https://segmentfault.com/q/1010000011359250/a-1020000011360185 上述链接中,大佬给除了解决方法,再次进 ...

  8. css3线条围绕跑马+jquery打字机效果

    原文地址:css3线条围绕跑马+jquery打字机效果 有图有真相,今天偶然看到了一种效果,仔细看了下,发现它是用css的clip+css3的动画实现的,简直叼.于是自己拿来了前一阵子写的打字机效果, ...

  9. css3折叠效果

    在开发过程中,经常会遇到一些交互效果,今天所联系的便是一个类似折纸的折叠效果,查看效果. 说到折纸,我们先看下图 这是我第一时间想到的大体思路,如果能让这6个面连续的变化角度到0不就可以了吗,运用cs ...

随机推荐

  1. Linux mariadb(Mysql)的主从复制架构

    mysql的主从复制架构,需要准备两台机器,并且可以通信,安装好2个mysql,保持版本一致性 mysql -v 查看数据库版本 1.准备主库的配置文件  /etc/my.cnf 写入开启主库的参数[ ...

  2. 聊聊数据库~6.SQL运维中篇

    上篇回顾:https://www.cnblogs.com/dotnetcrazy/p/10810798.html#top 1.6.5.MySQL日志相关 本文的测试环境:MySQL5.7.26.Mar ...

  3. PostgreSQL 里面的 BIGSERIAL

    @Id@GeneratedValue(strategy = GenerationType.IDENTITY)private Long id; CREATE TABLE article( id BIGS ...

  4. ubuntu sudo-update出错Encountered a section with no Package: header

    Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with Mer ...

  5. 隐藏c语言烦人的{ }

    .vimrc文件中添加 autocmd BufNewFile,BufRead * :syn match braces conceal "[{}]" set conceallevel ...

  6. [原创]java WEB学习笔记29:Cookie Demo 之自动登录

    本博客为原创:综合 尚硅谷(http://www.atguigu.com)的系统教程(深表感谢)和 网络上的现有资源(博客,文档,图书等),资源的出处我会标明 本博客的目的:①总结自己的学习过程,相当 ...

  7. [原创]java WEB学习笔记07:关于HTTP协议

    本博客为原创:综合 尚硅谷(http://www.atguigu.com)的系统教程(深表感谢)和 网络上的现有资源(博客,文档,图书等),资源的出处我会标明 本博客的目的:①总结自己的学习过程,相当 ...

  8. 【leetcode】Word Break

    Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separa ...

  9. How MapReduce Works(转)

    原文地址:http://www.cnblogs.com/ggjucheng/archive/2012/04/23/2465820.html 一.从Map到Reduce MapReduce其实是分治算法 ...

  10. DELPHI-Delphi常用类型及定义单元

    DELPHI-Delphi常用类型及定义单元 Type Unit Date SysUtils DeleteFile SysUtils or Windows (different versions) D ...