Jquery实现点击后收缩功能
2013-01-25 20:40
239 查看
<html>
<head>
<script type="text/javascript" src="../jquery/jquery.js" tppabs="http://www.w3school.com.cn/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
});
});
</script>
<style type="text/css">
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
div.panel
{
height:120px;
display:none;
}
</style>
</head>
<body>
<div class="panel">
<p>Because time is valuable, we deliver quick and easy learning.</p>
<p>At W3School, you can study everything you need to learn, in an accessible and handy format.</p>
</div>
<p class="flip">Show/Hide Panel</p>
</body>
</html>
<head>
<script type="text/javascript" src="../jquery/jquery.js" tppabs="http://www.w3school.com.cn/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
});
});
</script>
<style type="text/css">
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 1px #c3c3c3;
}
div.panel
{
height:120px;
display:none;
}
</style>
</head>
<body>
<div class="panel">
<p>Because time is valuable, we deliver quick and easy learning.</p>
<p>At W3School, you can study everything you need to learn, in an accessible and handy format.</p>
</div>
<p class="flip">Show/Hide Panel</p>
</body>
</html>
相关文章推荐
- jquery 点击页面其他地方实现隐藏菜单功能
- jquery实现点击缩略图在弹出层显示原图功能
- jQuery 实现全部到精简的转换 点击“显示全部品牌按钮”显示到第二幅图,个别文字高亮显示,并且“显示全部品牌”按钮文字变为“精简显示品牌”并且向上向下箭头改变,用JQuery实现本功能。
- Ajax+jQuery+bootstrap+Java实现异步点赞功能,并限制点击次数
- (jsp和servlet功能篇)jsp+Jquery实现点击行,获取行数据
- jquery实现checkbox全选功能,第二次点击【全选】按钮,页面无法勾选
- jquery实现表格中点击相应行变色功能
- 仿QQ好友 TableView 点击展开 收缩功能实现
- jquery实现表格中点击相应行变色功能效果【实例代码】
- 基于jQuery实现收缩展开功能
- jquery 点击页面其他地方实现隐藏菜单功能
- jQuery实现点击图标div循环放大缩小功能
- jQuery实现右侧功能栏、点击其它地方,右侧功能栏隐藏
- jQuery实现打开网页自动弹出遮罩层或点击弹出遮罩层功能示例
- 基于jquery快速实现网页右下角按钮点击后滚动回顶端的功能
- jquery实现具有收缩功能的垂直导航菜单
- jquery实现点击信息弹出层的功能
- jquery实现表格中点击相应行变色功能
- jQuery 点击图片跳转上一张或下一张功能的实现代码
- js和jQuery实现获取id和点击checkbox全选功能