最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Expandable "Detail" Table Rows

 更新時間:2007年08月29日 19:31:48   作者:  

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)

ID Name Total
123 Bill Gates 100
  2007-01-02 A short description 15
  2007-02-03 Another description 45
  2007-03-04 More Stuff 40
456 Bill Brasky 50
  2007-01-02 A short description 10
  2007-02-03 Another description 20
  2007-03-04 More Stuff 20
789 Phil Upspace 75
  2007-01-02 A short description 33
  2007-02-03 Another description 22
  2007-03-04 More Stuff 20

相關(guān)文章

最新評論

南汇区| 神农架林区| 白山市| 汪清县| 瓦房店市| 巴马| 雷山县| 凤凰县| 古浪县| 五莲县| 龙海市| 化州市| 九龙县| 曲周县| 林甸县| 新民市| 方山县| 西盟| 海晏县| 孟村| 财经| 吉林市| 本溪市| 澄城县| 舟曲县| 裕民县| 德格县| 宣城市| 区。| 开江县| 岑溪市| 高州市| 桓仁| 利津县| 平和县| 简阳市| 南通市| 永仁县| 霍林郭勒市| 左权县| 砀山县|