jQuery 点击查看 收起
<!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 点击查看 收起的更多相关文章
- jquery 点击查看,收起特效
<div class="all"> <p><a href="javascript:;" id="onvk"&g ...
- jquery 点击查看更多箭头变化,文字变化,超出带滚动条。
从网上好了好久,没找到自己要的,自己写了一下. <!DOCTYPE html> <html> <head> <meta charset="utf-8 ...
- jQuery点击图片放大拖动查看效果
效果如图: 放大前: 放大后(可拖动图片浏览): 源码如下: <html xmlns="http://www.w3.org/1999/xhtml"> <head& ...
- JS点击查看更多内容 控制段落文字展开折叠
JavaScript+jQuery实现的文字展开折叠效果,点击文字后文字内容会完整的显示出来,控制段落来显示文字,不需要的时候,可以再次点击后将内容折叠起来,也就是隐藏了一部分内容.点击查看更多的功能 ...
- jquery点击放大图片
参考地址:https://blog.csdn.net/qq_42249896/article/details/86569636 一.应用场景:点击图片可以对图片进行放大显示. 二.实现代码: 说明:我 ...
- jquery点击复选框触发事件给input赋值
体验效果:http://keleyi.com/keleyi/phtml/jqtexiao/31.htm 代码如下: <!DOCTYPE html> <html xmlns=" ...
- 基于jQuery点击加载动画按钮特效
分享一款基于jQuery点击加载动画按钮特效.这是一款基于jQuery+CSS3实现的鼠标点击按钮加载动画特效代码.效果图如下: 在线预览 源码下载 实现的代码. html代码: <div ...
- jquery点击改变图片src源码并toggle
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- jquery点击改变class并toggle;jquery点击改变图片src源码并toggle;jquery显示隐藏toggle
<html><head><meta charset="utf-8"><title></title><script ...
随机推荐
- 2强类型DataSet (2011-12-30 23:16:59)转载▼ 标签: 杂谈 分类: Asp.Net练习笔记 http://blog.sina.com.cn/s/blog_9d90c4140101214w.html
强类型DataSet (2011-12-30 23:16:59) 转载▼ 标签: 杂谈 分类: Asp.Net练习笔记 using System; using System.Collections.G ...
- linux系统无法上外网,路由器可以上网,可以ping通路由器,ping不通外网IP
临时生效方法(添加路由网关),执行: #route add default gw 192.168.92.1 #根据实际网关IP填写 如果不行,使用下面方法: 一:使用 route 命令添加使用ro ...
- bzoj 1731 Layout 排队布局 —— 差分约束
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1731 差分约束: ML: dis[y] - dis[x] <= k,即 x 向 y 连 ...
- 腾讯微博 JS-SDK接入
官方文档: open.js api查询 api调试接口 1.接口初始化 加载openjs源代码. <script type="text/javascript" src=&qu ...
- 浅谈JAVA中如何利用socket进行网络编程(一)
转自:http://developer.51cto.com/art/201106/268385.htm Socket是网络上运行的两个程序间双向通讯的一端,它既可以接受请求,也可以发送请求,利用它可以 ...
- 1.Ext.onReady详解
转自:https://blog.csdn.net/xufang461010923/article/details/37660139 我们知道,只有在Ext框架全部加载完后才能在客户端的代码中使用Ext ...
- php 和 js之间使用json通信
有时候我们需要用后台从数据库中得到的数据在js中进行处理,但是当从php中获取到数据的时候,使用的是键值对形式的多维关联数组.而我们知道,js只支持索引数组,不支持关联数组,这个时候从后台传递过来的数 ...
- linux更改用户名,域名(转载)
转自:http://huangro.iteye.com/blog/365975 1. 我们在root权限下,使用命令: usermod -l new_user_name old_user_name 即 ...
- python 面向对象六 动态添加方法 __slots__限制动态添加方法
一.动态添加属性 >>> class Student(object): pass >>> st = Student() >>> st.name = ...
- bzoj 2660: [Beijing wc2012]最多的方案【dp】
有点神奇的dp 首先注意到任意一个数都能被表示成若干个斐波那契数的和的形式 先求出n可以字典序最大的表示 设f[i][0/1]表示第i个斐波那契数选或者不选 如果当前数不选,那就选比他小的两个数,否则 ...