accordion
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>accordion</title>
<script src="js/jquery-1.7.1.js"></script>
<script src="js/sqLib.js"></script>
<style>
.accordion-panel{
width: 400px; }
.accordion-panel-heading{
color: #d74147;
width: 400px;
height: 40px;
line-height: 40px;
border: 1px solid #d74147;
margin: 5px 0;
padding-left: 10px;
border-radius: 5px;
}
.accordion-panel-content{
display: none;
border: 1px solid #000;
width: 400px;
border-radius: 5px;
padding-left: 10px;
line-height: 40px;
}
</style>
<script>
$(function(){
$('.accordion-panel-heading').on('click',function(){
if($(this).hasClass('active')) {
$(this).removeClass('active');
$(this).siblings('.accordion-panel-content').slideUp('slow');
}
else {
$('.accordion .accordion-panel-heading').removeClass('active');
$('.accordion .accordion-panel-content').slideUp('slow');
$(this).addClass('active');
$(this).siblings('.accordion-panel-content').slideDown('slow');
}
}); });
</script>
</head>
<body>
<div class="accordion">
<div class="accordion-panel">
<div class="accordion-panel-heading">标题1</div>
<div class="accordion-panel-content">内容1</div>
</div>
<div class="accordion-panel">
<div class="accordion-panel-heading">标题2</div>
<div class="accordion-panel-content">内容2</div>
</div>
<div class="accordion-panel">
<div class="accordion-panel-heading">标题3</div>
<div class="accordion-panel-content">内容3</div>
</div>
<div class="accordion-panel">
<div class="accordion-panel-heading">标题4</div>
<div class="accordion-panel-content">内容4</div>
</div> </div>
</body>
</html>
accordion的更多相关文章
- toolkit:Accordion DataTemplate ListBox TextBlock Interaction.Triggers
困扰好几个小时的问题终于解决了,本人系菜鸟,使用MVVM设计模式,绑定DataTemplate的Command,需要使用 DataContent的资源,否则无法触发ICommand ClickChil ...
- Accordion - 手风琴
//手风琴效果 <div style="overflow:hidden;height:400px;width:948px;"> <div class=" ...
- jqueryui / accordion的用法记录
jqueryui 的 widget 中包含了基本上我们都需要的ui组件, 除了那个unslider. 参考地址是: www.jqueryui.com. 要能够看懂/并使用/ 完全掌握的话, 就要使用其 ...
- wpf中手风琴控件Accordion编辑模板后控件不正常。
昨天有个网友Accordion控件从sl迁移到wpf时候显示不正常.也是就没有效果. 我也是sl做的比较多,wpf玩的少,Accordion模板里触发器,状态组调了一早上都没达到满意效果, 无奈只有百 ...
- boostrap折叠,jquery ui accordion同时打开多个标签
http://caibaojian.com/bootstrap/javascript.html http://www.w3cschool.cc/jqueryui/example-accordion.h ...
- AngularJs的UI组件ui-Bootstrap分享(三)——Accordion
Accordion手风琴控件使用uib-accordion和uib-accordion-group指令. <script> angular.module('myApp', ['ui.boo ...
- [转]ionic Accordion list three levels
简化后的主要代码: $scope.groups = []; for (var i = 0; i < 2; i++) { $scope.groups[i] = { name: i, items: ...
- flex的Accordion组件头部文本居中显示
flex的Accordion组件头部文本默认是居左的,可以通过设置headerStyleName属性使之居中,另外还可以设置字体的样式等 <?xml version="1.0" ...
- JQ实现accordion(可折叠)效果
先看效果--这个就是手风琴的效果: 原理:首先默认section1下面的dd可见,其他的全部隐藏:当点击某个obj时候, 快速隐藏全部的dd,然后只有obj.NEXT().show ...
- 【jQuery UI 1.8 The User Interface Library for jQuery】.学习笔记.5.Accordion控件
accordion是另一个UI控件,能允许你将一组content加入相互分隔的.能够被浏览者的交互打开或关闭的panels中.因此,它大多数的content在初始化的时候是隐藏的,很像tabs控件.每 ...
随机推荐
- Sql Server相关的性能计数器
OS Memory and Paging 性能计数器: 1.Memory\Availability Mbytes 未使用的物理内存(非页面文件),通常情况下它应该大于100MB 2.Memory\ ...
- mysql导出数据到excel表中
mysql> select b.username,a.subject,a.money,FROM_UNIXTIME(a.ctime) from shop_pay a INNER JOIN ...
- wamp出现问题#1045 - Access denied for user 'root'@'localhost' (using password: NO)的解决方法
打开wamp->apps->phpmyadmin目录下面的config.inc.php文件 cfg['Servers'][$i]['verbose'] = 'localhost';$cfg ...
- HTML 5 学习 (1)
一.HTML的发展 20世纪70年代~80年代之间HTML正式诞生,但是没有一个统一的标准,显示内容比较单一.在netscape上显示的网页可能在ie5中无法正常显示,反之亦然. 1998年,HTML ...
- zmodem协议的使用(SecureCRT)
SecureCRT可以使用zmodem协议来快速的传送文件,使用非常方便.对于Linux系统,大多数发行版本都自带有rz和sz命令.在SecureCRT中选择Options->Session O ...
- Ubuntu配置OpenGL环境
建立基本编译环境 sudo apt-get install build-essential 安装OpenGL Library sudo apt-get install libgl1-mesa-dev ...
- 进程退出前删除自身EXE
进程退出前删除自身EXE 下面的代码由Gary Nebbett写就.Gary Nebbett乃是WINDOWS NT/2000 NATIVE API REFERENCE的作者.乃NT系统一等一的高手. ...
- 载入OpenSSL的动态库——学会使用tryToLoadOpenSslWin32Library和QPair
Libraries name of openssl? The "library" portion of OpenSSL consists of two libraries. On ...
- 为何visua studio看不到C++项目的LOG?
最近工程中添加了一个用C++编写的项目 它作为了我正式使用项目的引用 但是当我debug的时候 居然没有看到应该有的LOG 最后找到了解决方法,如下图所示: 右击你的正式项目,属性 改变调试器类型中的 ...
- 经典CSS颜色混合模式
转自:http://www.webhek.com/css-blend-mode/ 注意:只有使用最新版的谷歌浏览器.火狐浏览器,才能正确的显示本文中的演示. Photoshop里最没有用处的一种功能— ...