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

Expandable "Detail" Table Rows

 更新時(shí)間: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)文章

最新評論

邵阳市| 弥渡县| 湖北省| 咸宁市| 金塔县| 望江县| 上虞市| 万年县| 灵璧县| 神木县| 苍梧县| 山西省| 仪征市| 都安| 长汀县| 保山市| 浙江省| 汉寿县| 乌苏市| 高淳县| 田阳县| 襄樊市| 晋宁县| 海宁市| 珲春市| 阳谷县| 长兴县| 石家庄市| 德安县| 宁陵县| 濮阳市| 东台市| 罗平县| 无锡市| 乐清市| 阿瓦提县| 广河县| 江孜县| 章丘市| 富平县| 安阳县|