转自: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. 怎样将lua移植到arm平台的linux内核

    将脚本移植到内核是一件非常酷的事情,lua已经被移植到NetBSD的内核中,也有一个叫lunatik的项目把lua移植到了linux内核.仅仅可惜仅仅支持x86.不支持arm,在网上搜索了下,没有找到 ...

  2. this.Hide()与this.Visible、Application.Exit与this.Close()区别

    首先明确this.Hide()和this.Visible作用完全一样,都是隐藏当前窗体,使其不可见:Application.Exit与this.Close()虽然都有关闭当前应用的作用,但作用不同. ...

  3. 【leetcode刷题笔记】Next Permutation

    Implement next permutation, which rearranges numbers into the lexicographically next greater permuta ...

  4. Android系统定制之SystemUI修改:下拉通知栏尺寸【转】

    本文转载自:https://blog.csdn.net/huil0925/article/details/67632358 最近项目需要修改下拉通知栏面板的宽度,完成后,写个Blog做个总结,也提供给 ...

  5. vRA Customizing error

    toolsDeployPkg.log An error occurred while customizing VM vwbjvuqtest0751. For details reference the ...

  6. poj 1032 Parliament 【思维题】

    题目地址:http://poj.org/problem?id=1032 Parliament Time Limit: 1000MS   Memory Limit: 10000K Total Submi ...

  7. Luogu-1381 单词背诵

    先将n个单词插入哈希表,记录左右端点,每次右端点往后移动,读入一个新的单词并记录下它的哈希值,如果这个单词之前没出现过那么更新\(ans\)和\(minl\),如果左端点的单词出现了不止一次则可以往右 ...

  8. php把字符串指定字符分割成数组

    <?php $str="1|2|3|4|5|"; $var=explode("|",$str); print_r($var); ?> $var=ex ...

  9. 创建表空间的sql语句

    create tablespace ldcounter logging datafile 'D:\user_data.dbf' size 50m autoextend on next 50m maxs ...

  10. strnpy函数

    函数原型: char * strncpy ( char * destination, const char * source, size_t num ); 功能:从字符串source中复制 num个字 ...