jquery中手风琴效果实用源代码
来源:互联网 发布:我的世界手机版js制作 编辑:程序博客网 时间:2024/05/22 14:50
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>手风琴效果</title>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"></script>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.18.custom.css" rel="stylesheet" />
<script type="text/javascript">
$(function(){
$("#accordion").accordion({
header: "h3", //头信息。页面中div是什么这就必须是什么
event:"mouseover", //面板展开的效果事件,默认是click
active:1, //默认展开的面板,从0开始,默认值为0
animated:"bounceslide", //面板展开的动画效果
autoHeight:true, //面板的高度是否是自动增高的,默认为true
fillSpace:true, //填充到父元素
icons:{
//图标的设置 header默认时的效果 headerSelected代表是面板激活状态的效果图标
header:"ui-icon-carat-2-e-w",
headerSelected:"ui-icon-carat-2-n-s"
}
}).sortable({
axis:"y", //表示只能在y轴上托拽排序 x轴 x,y默认x,y
handle:"h3", //只能拖拽h3
/* stop:function(event,ui){
//stop事件 本身是一个匿名函数 event是浏览器自带的事件处理对象 ui操作控件对象
//alert("你要停止吗?");
ui.item.children("h3").triggerHandler("focusout");
}*/
});
$("#accordion").bind("sortstop",function(event,ui){
alert("hdsadhhds");
});
});
</script>
</head>
<body>
<div id="accordion" style="width:600px; height:400px; border:#0F0 solid 1px;">
<div>
<h3><a href="#">First</a></h3>
<div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>
</div>
<div>
<h3><a href="#">Second</a></h3>
<div>Phasellus mattis tincidunt nibh.</div>
</div>
<div>
<h3><a href="#">Third</a></h3>
<div>Nam dui erat, auctor a, dignissim quis.</div>
</div>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>手风琴效果</title>
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"></script>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.18.custom.css" rel="stylesheet" />
<script type="text/javascript">
$(function(){
$("#accordion").accordion({
header: "h3", //头信息。页面中div是什么这就必须是什么
event:"mouseover", //面板展开的效果事件,默认是click
active:1, //默认展开的面板,从0开始,默认值为0
animated:"bounceslide", //面板展开的动画效果
autoHeight:true, //面板的高度是否是自动增高的,默认为true
fillSpace:true, //填充到父元素
icons:{
//图标的设置 header默认时的效果 headerSelected代表是面板激活状态的效果图标
header:"ui-icon-carat-2-e-w",
headerSelected:"ui-icon-carat-2-n-s"
}
}).sortable({
axis:"y", //表示只能在y轴上托拽排序 x轴 x,y默认x,y
handle:"h3", //只能拖拽h3
/* stop:function(event,ui){
//stop事件 本身是一个匿名函数 event是浏览器自带的事件处理对象 ui操作控件对象
//alert("你要停止吗?");
ui.item.children("h3").triggerHandler("focusout");
}*/
});
$("#accordion").bind("sortstop",function(event,ui){
alert("hdsadhhds");
});
});
</script>
</head>
<body>
<div id="accordion" style="width:600px; height:400px; border:#0F0 solid 1px;">
<div>
<h3><a href="#">First</a></h3>
<div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div>
</div>
<div>
<h3><a href="#">Second</a></h3>
<div>Phasellus mattis tincidunt nibh.</div>
</div>
<div>
<h3><a href="#">Third</a></h3>
<div>Nam dui erat, auctor a, dignissim quis.</div>
</div>
</div>
</body>
</html>
- jquery中手风琴效果实用源代码
- jQuery手风琴效果
- jquery实现手风琴效果
- jquery手风琴效果插件
- jquery插件手风琴效果
- jquery插件-手风琴效果
- jquery插件手风琴效果
- jquery简单手风琴效果
- jQuery手风琴效果
- jquery手风琴效果
- jquery实现手风琴效果
- jquery手风琴效果
- jQuery实现手风琴效果
- jquery ui 手风琴效果集锦
- Jquery UI插件---手风琴效果
- 使用jQuery实现手风琴效果
- jQuery-ui中的手风琴效果
- jquery插件--实现手风琴效果
- win7下,创建文件夹映射
- JSP中pageEncoding和charset区别,中文乱码解决方案
- jQuery BlockUI插件
- ymPrompt消息提示组件4.0版[2009-03-02]DEMO演示及使用简介
- Java+PHP整合=混血新宠儿
- jquery中手风琴效果实用源代码
- 【反射】基于反射的实际应用——任意对象数组的排序
- request 获取访问IP
- 建立索引时no segments* file found 的问题
- SendMessage 和 PostMessage 的区别
- CryENGINE Feathure
- 用了皮肤控件之后,报错:容量超出了最大容量 参数名:capacity
- jquery-dialog对话框的实现
- 超链接点击无效的实现方式