带CheckBox美化控件的表格全选
带CheckBox美化控件
<table class="positionTable commonListTable" id="positionTable">
<thead>
<tr><th class="w1"><input type="checkbox" id="allCheck" /></th>
</thead>
<tbody>
<tr class="bgor">
<td class="w1"><input type="checkbox" value="" /></td></tr>
</tbody>
</table>
<div class="pageWrap clearfix">
<ul class="allUL">
<li id="allCheck2">全选</li>
<li id="btnDelSel">职位删除</li>
</ul>
<div id="PositionsPageBar" class="xiPagination">
这里显示分页
</div>
</div>
//全选
$("#allCheck").click(function () {
var $this = $(this);
var $checkbox = $("#positionTable .bgor .w1 input.checkbox");
var $a = $("#positionTable .bgor .w1 .jqTransformCheckbox");
if ($this.attr("checked") == true || $this.attr("checked") == "checked") {
$checkbox.attr("checked", true);
$a.addClass("jqTransformChecked");
$("#allCheck2").text("反选");
} else {
$checkbox.removeAttr("checked");
$a.removeClass("jqTransformChecked");
$("#allCheck2").text("全选");
}
});
$("#allCheck2").click(function () {
var $this = $(this);
var $checkbox = $("#positionTable .w1 input.checkbox");
var $a = $("#positionTable .w1 .jqTransformCheckbox");
if ($this.text() == "全选") {
$checkbox.attr("checked", true);
$a.addClass("jqTransformChecked");
$this.text("反选");
$("#positionTable input[type=checkbox]").attr("checked", true);
} else {
$checkbox.removeAttr("checked");
$a.removeClass("jqTransformChecked");
$this.text("全选");
$("#positionTable input[type=checkbox]").attr("checked", false);
}
});
带CheckBox美化控件的表格全选的更多相关文章
- JS列表的下拉菜单组件(仿美化控件select)
JS列表的下拉菜单组件(仿美化控件select) 2014-01-23 23:51 by 龙恩0707, 1101 阅读, 6 评论, 收藏, 编辑 今天是农历23 也是小年,在这祝福大家新年快乐!今 ...
- asp.net关于Repeater控件中的全选,批量操作
今天在Repeater控件中碰到一个全选的操作,于是上网查了一下,找到一个觉得比较好,便记录下来, 界面代码简化之后(全选操作): <script type="text/javascr ...
- jQuery---prop方法和表格全选案例
prop方法和表格全选案例 对于布尔类型的属性,不用attr方法,应该用prop方法 prop用法跟attr方法一样 <input type="button" value=& ...
- 在Indicator中添加动态Checkbox,无需绑定数据源,支持全选 - Ehlib学习(二)
先做设置 DBGrideh属性设置: IndicatorOptions = [gioShowRowIndicatorEh, //小三角指示 gioShowRecNoEh, //数据源行号 gioSho ...
- javascript总结41:表格全选反选,经典案例详解
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...
- Android ListView 中加入CheckBox/RadioButton 选择状态保持、全选、反选实现
最近在一个项目中,需要在ListView的item中加入CheckBox,但是遇到的一个问题是上下滑动的时候如果有选择了的CheckBox,就会出现选择项错误的问题,下面将个人的解决方法总结如下;先说 ...
- JS练习:表格全选与全不选
代码: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title ...
- 【WPF】2、美化控件
控件有默认样式,但是有时候默认样式并不够用,就需要美化. 1.常用的方法是美术出图,直接贴图进去,效果又好又简单(对程序来说). 用图片有三种方式:设置控件背景图片.设置控件内容为图片和直接使用图片做 ...
- asp.net GridView控件中诗选全选和全不选功能
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...
随机推荐
- C#模拟鼠标、键盘操作
C语言 在程序中打开网页,模拟鼠标点击.键盘输入 一.简述 记--使用C语言 打开指定网页,并模拟鼠标点击.键盘输入.实现半自动填写账号密码,并登录网站(当然现在的大部分网站都有验证码 ...
- GlusterFS Dispersed Volume(纠错卷)总结
https://blog.csdn.net/daydayup_gzm/article/details/52748812 一.概念 Dispersed Volume是基于ErasureCodes(纠错码 ...
- web自动化测试-selenium多表单切换
一.概述 1.在web应用中会经常遇到frame/iframe表单嵌套页面的应用 2.WebDriver只能在一个页面上对元素进行识别与定位 3.对于frame/iframe表单内嵌的页面上元素无法识 ...
- 【转】分布式事务,EventBus 解决方案:CAP【中文文档】
[转]分布式事务,EventBus 解决方案:CAP[中文文档] 最新文档地址:https://github.com/dotnetcore/CAP/wiki 前言 很多同学想对CAP的机制以及用法等想 ...
- [HTML5] Native lazy-loading for the web
According to HTTPArchive, images are the most requested asset type for most websites and usually tak ...
- POJ P1985 Cow Marathon 题解
这道题是我们考试的第一题,非常水,就是一个树的直径的板子.详见上一篇博客. #include<iostream> #include<cstdio> #include<cs ...
- WinDbg常用命令系列---显示当前异常处理程序链!exchain
!exchain 这个!exchain扩展命令显示当前异常处理程序链. !exchain [Options] 参数: Options下列值之一: /c 如果检测到异常,则显示与调试C++ try/c ...
- C# 监测每个方法的执行次数和占用时间(测试5)
又找到了一个bug 测试的类: public class Class11_1 { public virtual List<int> test2_1(List<tb_SensorRec ...
- P2340 奶牛会展 DP 背包
P2340 奶牛会展 DP \(n\)头牛,每头牛有智商\(s[i]\)情商\(f[i]\),问如何从中选择几头牛使得智商情商之和最大 且 情商之和.智商之和非负 \(n\le 400,-10^3\l ...
- PHP strtok() 函数
我们仅在第一次调用 strtok() 函数时使用了 string 参数.在首次调用后,该函数仅需要 split 参数,这是因为它清楚自己在当前字符串中所在的位置. 如需分割一个新的字符串,请再次调用带 ...