The only requirements are:

Put a class of "parent" o " /> 欧美一级二级三级乱码,欧美电影免费观看网站,欧美精品欧美精品

色尼玛亚洲综合影院,亚洲3atv精品一区二区三区,麻豆freexxxx性91精品,欧美在线91

Expandable "Detail" Table Rows

A common UI is to have a table of data rows, which when clicked on expand to show a detailed breakdown of "child" rows below the "parent" row.

The only requirements are: 

Put a class of "parent" on each parent row (tr) 
Give each parent row (tr) an id 
Give each child row a class of "child-ID" where ID is the id of the parent tr that it belongs to 

Example Code
$(function() {
    $('tr.parent')
        .css("cursor","pointer")
        .attr("title","Click to expand/collapse")
        .click(function(){
            $(this).siblings('.child-'+this.id).toggle();
        });
    $('tr[@class^=child-]').hide().children('td');
});Example Table (click a row)

IDNameTotal
123Bill Gates100
 2007-01-02A short description15
 2007-02-03Another description45
 2007-03-04More Stuff40
456Bill Brasky50
 2007-01-02A short description10
 2007-02-03Another description20
 2007-03-04More Stuff20
789Phil Upspace75
 2007-01-02A short description33
 2007-02-03Another description22
 2007-03-04More Stuff20

JavaScript技術Expandable "Detail" Table Rows,轉載需保留來源!

鄭重聲明:本文版權歸原作者所有,轉載文章僅為傳播更多信息之目的,如作者信息標記有誤,請第一時間聯系我們修改或刪除,多謝。

主站蜘蛛池模板: 青浦区| 河源市| 沙雅县| 内黄县| 日土县| 土默特左旗| 大化| 格尔木市| 花垣县| 康平县| 山西省| 全南县| 革吉县| 眉山市| 嘉祥县| 化德县| 华安县| 连江县| 西青区| 开阳县| 花垣县| 图木舒克市| 玛纳斯县| 开阳县| 滕州市| 广南县| 偏关县| 自治县| 祁门县| 阜阳市| 射阳县| 芷江| 花莲县| 建水县| 南乐县| 冀州市| 潼关县| 齐齐哈尔市| 顺义区| 比如县| 泗阳县|