The only requirements are:

Put a class of "parent" o " /> 国产精品视频一区二区高潮,成人在线免费观看黄色,av毛片精品

色尼玛亚洲综合影院,亚洲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,轉載需保留來源!

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

主站蜘蛛池模板: 桃源县| 巧家县| 沙洋县| 枞阳县| 历史| 泾源县| 平和县| 韩城市| 天全县| 讷河市| 辽阳市| 赤城县| 鄂托克前旗| 遵义县| 新巴尔虎左旗| 沁水县| 达尔| 门头沟区| 广灵县| 昌江| 安泽县| 井冈山市| 桂阳县| 仲巴县| 都江堰市| 宝鸡市| 延安市| 九龙坡区| 江孜县| 武山县| 鄢陵县| 南投市| 乐亭县| 西丰县| 西林县| 蛟河市| 夹江县| 灵石县| 七台河市| 林口县| 东方市|