Kin_Tables

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-11 12:13:28

软件介绍

/*******************************************************************************
Name: Kin_Table
Website: http://jorkin.reallydo.com/article.asp?id=538
Version: 1.0
Update: 2007/08/05
Introduction: toggle table row color by mouseover
and check checkbox by click table row
and toggle table row background-color by check checkbox
but can not exclude checkboxes (I dont need this. ^_^ )
Reference: Dodo (tableRowCheckboxToggle)
Softcomplex (tigra_tables)
Others:Need jQuery
******************************************************************************/

function Kin_Tables(Kin_Table_GetTableMethod, //get your table
Kin_Table_Header_Offset, //set the table header offset
Kin_Table_Footer_Offset, //set the table footer offset
Kin_Table_Odd_Style, // set the table odd row style name (Default:odd)
Kin_Table_Even_Style, // set the table even row style name (Default:even)
Kin_Table_Hover_Style, // set the table mouseover row style name (Default:over)
Kin_Table_Click_Style // set the table odd row style name (Default:clicked)
){

$(function(){
var Kin_Table_Config = [];
Kin_Table_Config.GetTableMethod = (Kin_Table_GetTableMethod ? Kin_Table_GetTableMethod : ".Kin_Table"); //得到Table的方法 同$() 必选
Kin_Table_Config.Header_Offset = (!isNaN(Kin_Table_Header_Offset) ? Kin_Table_Header_Offset : 0); //从前起忽略多少行 可选参数
Kin_Table_Config.Footer_Offset = (!isNaN(Kin_Table_Footer_Offset) ? Kin_Table_Footer_Offset : 0); //从后起忽略多少行 可选参数
Kin_Table_Config.Odd_Style = (Kin_Table_Odd_Style ? Kin_Table_Odd_Style : "odd"); //奇数行样式 可选参数
Kin_Table_Config.Even_Style = (Kin_Table_Even_Style ? Kin_Table_Even_Style : "even"); //偶数行样式 可选参数
Kin_Table_Config.Hover_Style = (Kin_Table_Hover_Style ? Kin_Table_Hover_Style : "over"); //鼠标悬停样式 可选参数
Kin_Table_Config.Click_Style = (Kin_Table_Click_Style ? Kin_Table_Click_Style : "clicked"); //鼠标点击样式 可选参数

//var Kin_Table = $(Kin_Table_Config.GetTableMethod+" tr:nth-child(n+"+eval(Kin_Table_Config.Header_Offset+1)+")"); //Old Method
var Kin_Table = $(Kin_Table_Config.GetTableMethod + " tr").slice(Kin_Table_Config.Header_Offset,-Kin_Table_Config.Footer_Offset); //New Method

Kin_Table.each(function(i, row){
var Kin_Table_Row_Checkbox = $(row).find(":checkbox");
bChecked = false;
$(row).addClass(i % 2 == 0 ? Kin_Table_Config.Odd_Style : Kin_Table_Config.Even_Style)
$(row).hover(function(){
$(this).addClass(Kin_Table_Config.Hover_Style);
}, function(){
$(this).removeClass(Kin_Table_Config.Hover_Style);
});
$(row).click(function(){
$(this).toggleClass(Kin_Table_Config.Click_Style);
Kin_Table_Row_Checkbox.each(function(){
this.checked = $(row).hasClass(Kin_Table_Config.Click_Style);
});
});
Kin_Table_Row_Checkbox.each(function(){
if (this.checked) {
bChecked = true;
return false;
}
});
if (bChecked) {
$(row).addClass(Kin_Table_Config.Click_Style);
Kin_Table_Row_Checkbox.each(function(){
this.checked = true;
});
}
else {
$(row).removeClass(Kin_Table_Config.Click_Style);
}
});
});
}

本文地址:https://www.codercto.com/soft/d/23141.html

程序员的自我修养

程序员的自我修养

陈逸鹤 / 清华大学出版社 / 2017-5 / 49.00

程序员作为一个职业、也作为一个群体,正逐渐从幕后走向前台,并以他们自己的能力加速改变着世界,也改变着人们生活的方方面面。然而,对于程序员,特别是年轻程序员们来说,如何理解自己的职业与发展,如何看待自己的工作与生活,这些问题往往比那些摆在面前的技术难题更让他们难以解答。 这本书从一个成熟程序员、一名IT管理者的角度,以杂记的形式为大家分享关于国内程序员职业生涯、个人发展、编程中的实践与认知乃至......一起来看看 《程序员的自我修养》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具