<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>点击查看 收起</title>
<script src="js/jquery-1.7.1.min.js"></script>
</head>
<style>
.abc{width: 150px;height: 150px;background: red;}
.fff{font-size: 18px;color: blue;}
.big-box{background: #888;}
.pink{
width: 150px;
height: 100px;
background: pink;
position: absolute;
margin: auto;
left: 0;
right: 0;
bottom: 0;
top: 0;
transform: rotate(80deg);
text-align: center;
line-height: 100px;
} .fff{
background: #fff;
border: 1px solid #000;
}
.head{line-height: 30px;}
.arrow{width: 20px;height: 20px;background: red;display: block;float: right;} .show_hide_btn{line-height: .64rem;font-size: .28rem;color: #4c4c4c;text-align: center;}
.show_hide_btn i{display: inline-block;width: 50px;height:50px;vertical-align: top;margin-top: .18rem;margin-left: .1rem;
background: url(img/fold_t.png) no-repeat center #fe3837;background-size: 30px auto;border-radius: 50%; box-shadow: 0 5px 15px 0 rgba(0,0,0,.14);}
.show_hide_btn i.flod_t{background: url(img/fold_t.png) no-repeat center #fe3837; background-size: 30px auto;transform:rotate(180deg);
-ms-transform:rotate(180deg); /* IE 9 */
-moz-transform:rotate(180deg); /* Firefox */
-webkit-transform:rotate(180deg); /* Safari 和 Chrome */
-o-transform:rotate(180deg); }
</style>
<script>
$(document).ready(function() {
var le = $('div.coup_list').length;
if(le >1){
$('.show_hide_btn').css('display','block');
$('.coup_list:gt(0)').css('display','none');
}
$('.show_hide_btn').toggle(function(){
$('.coup_list:gt(0)').show();
$('.show_hide_btn i').addClass('flod_t');
$('.show_hide_btn span').html('收起')
}
,function(){
$('.coup_list:gt(0)').hide();
$('.show_hide_btn i').removeClass('flod_t');
$('.show_hide_btn span').html('点击查看');
})
}); </script>
<body>
<div class="coup">
<div class="coup_list">111</div>
<div class="coup_list">44445</div>
<div class="coup_list">5675</div>
<div class="coup_list">ertyr</div>
<div class="coup_list">ertyer</div>
<div class="coup_list">ertye</div>
<div class="coup_list">etryefsdfr</div>
<div class="show_hide_btn" style="display:none" ><span>点击查看全部券码 </span><i class=""></i></div>
</div> </body>
</html>

jQuery 点击查看 收起的更多相关文章

  1. jquery 点击查看,收起特效

    <div class="all"> <p><a href="javascript:;" id="onvk"&g ...

  2. jquery 点击查看更多箭头变化,文字变化,超出带滚动条。

    从网上好了好久,没找到自己要的,自己写了一下. <!DOCTYPE html> <html> <head> <meta charset="utf-8 ...

  3. jQuery点击图片放大拖动查看效果

    效果如图: 放大前: 放大后(可拖动图片浏览): 源码如下: <html xmlns="http://www.w3.org/1999/xhtml"> <head& ...

  4. JS点击查看更多内容 控制段落文字展开折叠

    JavaScript+jQuery实现的文字展开折叠效果,点击文字后文字内容会完整的显示出来,控制段落来显示文字,不需要的时候,可以再次点击后将内容折叠起来,也就是隐藏了一部分内容.点击查看更多的功能 ...

  5. jquery点击放大图片

    参考地址:https://blog.csdn.net/qq_42249896/article/details/86569636 一.应用场景:点击图片可以对图片进行放大显示. 二.实现代码: 说明:我 ...

  6. jquery点击复选框触发事件给input赋值

    体验效果:http://keleyi.com/keleyi/phtml/jqtexiao/31.htm 代码如下: <!DOCTYPE html> <html xmlns=" ...

  7. 基于jQuery点击加载动画按钮特效

    分享一款基于jQuery点击加载动画按钮特效.这是一款基于jQuery+CSS3实现的鼠标点击按钮加载动画特效代码.效果图如下: 在线预览   源码下载 实现的代码. html代码: <div ...

  8. jquery点击改变图片src源码并toggle

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

  9. jquery点击改变class并toggle;jquery点击改变图片src源码并toggle;jquery显示隐藏toggle

    <html><head><meta charset="utf-8"><title></title><script ...

随机推荐

  1. HDU2444 The Accomodation of Students —— 二分图最大匹配

    题目链接:https://vjudge.net/problem/HDU-2444 The Accomodation of Students Time Limit: 5000/1000 MS (Java ...

  2. python compileall 打包发布

    Python工程的编译.合并.打包.发布   from:https://my.oschina.net/bfbd/blog/864310 确保要发布的包(demo)的根目录中有__main__.py文件 ...

  3. 配置磁盘映射(在服务器和eclipse 中)

    在eclipse中配置磁盘映射和项目名称访问省略:

  4. 洛谷P3004 宝箱Treasure Chest——DP

    题目:https://www.luogu.org/problemnew/show/P3004 似乎有点博弈的意思,但其实是DP: f[i][j] 表示 i~j 的最优结果,就可以进行转移: 注意两个循 ...

  5. hdu 1480

    钥匙计数之二 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Sub ...

  6. INT_PTR数据类型

    A signed integer type for pointer precision. Use when casting a pointer to an integer to perform poi ...

  7. #if、#ifdef、#if defined之间的区别(转载)

    转自:http://www.yucoat.com/c_program/difference_if_ifdef_if_defined.html #if的使用说明 #if的后面接的是表达式 #if (MA ...

  8. springboot(八) 嵌入式Servlet容器自动配置原理和容器启动原理

    1.嵌入式Servlet容器自动配置原理 1.1 在spring-boot-autoconfigure-1.5.9.RELEASE.jar => springboot自动配置依赖 jar包下,E ...

  9. vim下撤销操作.选中复制等操作

    vim撤销操作:u vim恢复操作:ctrl+r 使用normal模式下的  v命令,进入visual模式,v+ j/k/h/l   进行文本选中 对于选中的文本进行如下按键: (1.1)d   -- ...

  10. Oracle11.2.0.1升级到11.2.0.3

    Oracle数据库升级也并非简单的事,这篇博客,博主对Oracle那点事做了较详细的介绍: http://blog.itpub.net/9599/viewspace-473003/ 我还属于Oracl ...