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,轉載需保留來源!

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

主站蜘蛛池模板: 定州市| 宁陕县| 万宁市| 保德县| 博湖县| 会理县| 崇明县| 宝鸡市| 凤凰县| 小金县| 静乐县| 桦川县| 永吉县| 临潭县| 龙胜| 云安县| 青河县| 盐津县| 林西县| 百色市| 鄂托克前旗| 三江| 方城县| 九寨沟县| 汽车| 临夏县| 德格县| 商丘市| 泸溪县| 成都市| 万年县| 长顺县| 吉水县| 丰原市| 临夏市| 陵川县| 阜新| 光山县| 无极县| 胶南市| 禹城市|