Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/476.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在单击行时展开并合并行_Javascript_Jquery_Collapse_Expand - Fatal编程技术网

Javascript 在单击行时展开并合并行

Javascript 在单击行时展开并合并行,javascript,jquery,collapse,expand,Javascript,Jquery,Collapse,Expand,我搜索了用于展开和折叠行的引用。但在我的脚本中,它不起作用,这是我的脚本: <thead> <tr> <th width="5" class="cb"><input type="checkbox" id="cbcall" /></th> <th> Domain</th> <th> Total Member</th>

我搜索了用于展开和折叠行的引用。但在我的脚本中,它不起作用,这是我的脚本:

    <thead>   
    <tr>
        <th width="5" class="cb"><input type="checkbox" id="cbcall" /></th>

        <th> Domain</th>
        <th> Total Member</th>
        <th> Monthly Growth</th>
        <th> Growth % </th>
    </tr>
</thead>
<tbody>
    <?php foreach ( $this->paging as $kk=>$dom ): ?>
    <tr>
        <tr class="header" style="cursor:pointer;">
            <th><input type="checkbox" name="cb[]" value="<?php echo $dom['m'] ?>" /></th>
            <th colspan="3"><i class="fa fa-chevron-circle-right"></i>&nbsp<strong><?php echo $this->escape($dom['member_domain'])?></strong></th>
            <th></th>
        </tr>
        <?php foreach ( $this->paginator as $k=>$value ): ?>
            <tr>
            <?php if ($this->escape($value['member_domain']) == $this->escape($dom['member_domain'])){?>
                    <td></td>
                    <td><?php echo '&nbsp&nbsp&nbsp&nbsp&nbsp'.$this->escape($value['member_client']) ?> </td>
                    <td><center><?php echo $this->escape($value['1_month']) ?></center></td>
                    <td><center><?php echo $this->escape($value['1_month'])-$this->escape($value['2_month']) ?></center></td>
                    <td><center>
                        <strong><?php echo number_format((100 * ($this->escape($value['1_month'])-$this->escape($value['2_month'])))/$this->escape($value['1_month']),0)."%" ?>
                        </strong>
                        </center>
                    </td>
            <?php } ?>
            </tr>
        <?php endforeach; ?>    
    </tr>
    <?php endforeach; ?>
</tbody>
$('.header').click(function(){
    $(this).nextUntil('tr.header').slideToggle(100, function(){
    });
});
视图看起来像:

我想做一个扩展和折叠时,“域名”是点击

我使用过这种方法,但不起作用:

我使用了jquery1.110。有人帮忙吗???

$(文档).ready(函数(){
$(“.openbext”)。单击(函数(){
$(this.parents(“tr”).next(“tr”).show();
});
})

内容会在这里出现
内容会在这里出现
内容会在这里出现

我没有使用过PHP,但使用过JavaScript,您在控制台中看到任何错误吗?您链接的帖子中有几个(工作)方法,我们不知道您的实际脚本是什么,以及您何时执行它。请将相关代码添加到您的帖子中。@RahulSharma anything是干净的,先生,我的控制台上没有红色文本:(@Teemu抱歉,我忘了添加我的js..代码不完整,但它将帮助您感谢回复,我不知道为什么没有方法对我有效:(