Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/386.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 具有需要切换jQuery的隐藏行的表_Javascript_Jquery_Html Table_Toggle - Fatal编程技术网

Javascript 具有需要切换jQuery的隐藏行的表

Javascript 具有需要切换jQuery的隐藏行的表,javascript,jquery,html-table,toggle,Javascript,Jquery,Html Table,Toggle,我正在构建一个基本的表结构,它将有几个隐藏的行,这些行将在该行下填充触发器以切换它们。我的扳机好像不能用了。根据数据库中的数据量,所有行都将在C#中动态创建。因此,我尝试使用基于计数器的触发器来查找附加到触发器链接的行。任何帮助都将不胜感激。这是我的代码(请忽略内联样式这只是我让触发器工作的基础,并将在字符串变量中正确重建它。): 这里列出了实现要素服务质量的分类标准。其他详细信息单击错误。此处列出了实现非要素服务质量的标准。反馈触点Id 简介:此处列出了联系人简介,以了解有关通话内容的详细信

我正在构建一个基本的表结构,它将有几个隐藏的行,这些行将在该行下填充触发器以切换它们。我的扳机好像不能用了。根据数据库中的数据量,所有行都将在C#中动态创建。因此,我尝试使用基于计数器的触发器来查找附加到触发器链接的行。任何帮助都将不胜感激。这是我的代码(请忽略内联样式这只是我让触发器工作的基础,并将在字符串变量中正确重建它。):


这里列出了实现要素服务质量的分类标准。其他详细信息单击错误。此处列出了实现非要素服务质量的标准。反馈触点Id
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。12121
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。21354
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。212345
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。32456
这里列出了实现要素服务质量的分类标准。其他详细信息单击错误。此处列出了实现非要素服务质量的标准。反馈触点Id
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。12121
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。21354
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。212345
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。32456
这里列出了实现要素服务质量的分类标准。其他详细信息单击错误。此处列出了实现非要素服务质量的标准。反馈触点Id
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。12121
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。21354
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。212345
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。32456
这里列出了实现要素服务质量的分类标准。其他详细信息单击错误。此处列出了实现非要素服务质量的标准。反馈触点Id
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。12121
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。21354
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。212345
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。32456
这里列出了实现要素服务质量的分类标准。其他详细信息单击错误。此处列出了实现非要素服务质量的标准。反馈触点Id
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系人简介。此处显示未取得成就的评论和反馈。添加行可以加宽以容纳较大的注释。12121
简介:此处列出了联系人简介,以了解有关通话内容的详细信息。此处列出了联系概要。未达到要求者的评论和反馈
<table border="0">
    <tr style="background-color:#fff;"><td width="120px" align="left">This is Category</td><td width="370px" align="left">Criteria for achieving element off service quality is listed here. Additional Details click Errors. Criteria for achieving element off service quality is listed here.</td><td width="50px" align="center"><a id="a1" href="#">5</a></td><td width="150px" align="center">Feedback</td><td width="100px" align="center">Contact Id</td></tr>            
        <tr class="rpt28_row1" style="display:none; background-color:#fff;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">12121</td></tr>
        <tr class="rpt28_row1"style="display:none; background-color:#F1F5FA;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">21354</td></tr>
        <tr class="rpt28_row1" style="display:none; background-color:#fff;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">212345</td></tr>
        <tr class="rpt28_row1" style="display:none; background-color:#F1F5FA;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">32456</td></tr>
    <tr style="background-color:#F1F5FA;"><td width="120px" align="left">This is Category</td><td width="370px" align="left">Criteria for achieving element off service quality is listed here. Additional Details click Errors. Criteria for achieving element off service quality is listed here.</td><td width="50px" align="center"><a id="a2" href="#">5</a></td><td width="150px" align="center">Feedback</td><td width="100px" align="center">Contact Id</td></tr>
        <tr class="rpt28_row2" style="display:none; background-color:#fff;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">12121</td></tr>
        <tr class="rpt28_row2"style="display:none; background-color:#F1F5FA;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">21354</td></tr>
        <tr class="rpt28_row2" style="display:none; background-color:#fff;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">212345</td></tr>
        <tr class="rpt28_row2" style="display:none; background-color:#F1F5FA;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">32456</td></tr>
    <tr style="background-color:#fff;"><td width="120px" align="left">This is Category</td><td width="370px" align="left">Criteria for achieving element off service quality is listed here. Additional Details click Errors. Criteria for achieving element off service quality is listed here.</td><td width="50px" align="center"><a id="a3" href="#">5</a></td><td width="150px" align="center">Feedback</td><td width="100px" align="center">Contact Id</td></tr>
        <tr class="rpt28_row3" style="display:none; background-color:#fff;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">12121</td></tr>
        <tr class="rpt28_row3"style="display:none; background-color:#F1F5FA;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">21354</td></tr>
        <tr class="rpt28_row3" style="display:none; background-color:#fff;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">212345</td></tr>
        <tr class="rpt28_row3" style="display:none; background-color:#F1F5FA;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">32456</td></tr>
    <tr style="background-color:#F1F5FA;"><td width="120px" align="left">This is Category</td><td width="370px" align="left">Criteria for achieving element off service quality is listed here. Additional Details click Errors. Criteria for achieving element off service quality is listed here.</td><td width="50px" align="center"><a id="a4" href="#">5</a></td><td width="150px" align="center">Feedback</td><td width="100px" align="center">Contact Id</td></tr>
        <tr class="rpt28_row4" style="display:none; background-color:#fff;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">12121</td></tr>
        <tr class="rpt28_row4"style="display:none; background-color:#F1F5FA;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">21354</td></tr>
        <tr class="rpt28_row4" style="display:none; background-color:#fff;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">212345</td></tr>
        <tr class="rpt28_row4" style="display:none; background-color:#F1F5FA;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">32456</td></tr>
    <tr style="background-color:#fff;"><td width="120px" align="left">This is Category</td><td width="370px" align="left">Criteria for achieving element off service quality is listed here. Additional Details click Errors. Criteria for achieving element off service quality is listed here.</td><td width="50px" align="center"><a id="a5" href="#">5</a></td><td width="150px" align="center">Feedback</td><td width="100px" align="center">Contact Id</td></tr>
        <tr class="rpt28_row1" style="display:none; background-color:#fff;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">12121</td></tr>
        <tr class="rpt28_row1"style="display:none; background-color:#F1F5FA;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">21354</td></tr>
        <tr class="rpt28_row1" style="display:none; background-color:#fff;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">212345</td></tr>
        <tr class="rpt28_row1" style="display:none; background-color:#F1F5FA;"><td width="120px" align="left">Synopsis:</td><td width="370px" align="left">The contact synopsis is listed here for detail regarding what occured on the call. Contact synopsis listed here.</td><td width="50px" align="center"><img src="Images/category_notachieved_icon.png" alt="" /></td><td width="150px" style="color:#E56A19;" align="center">Comments & Feedback for non achievement displays here. Additions Row can widen to acommodate larger comments.</td><td width="100px" align="center">32456</td></tr>
</table>

 $(document).ready(function(){
    function assignClickHandlerFor(boxNum) {

            console.log('#a' + boxNum);
            $('#a' + boxNum).click(function (evt) {
                evt.preventDefault();
                evt.stopPropagation();

                var $aRow = $(evt.currentTarget); 

                $aRow.find('.rpt28_row' + boxNum).toggle();                  
            });
        }

        var i;

        for (i = 1; i <= 5; i++) {
            assignClickHandlerFor(i);
        }        
 });
var $aRow = $(evt.currentTarget);
var $aRow = $(this).parents('table')
 $(document).ready(function(){
    function assignClickHandlerFor(boxNum) {

            console.log('#a' + boxNum);
            $('#a' + boxNum).click(function (evt) {
                evt.preventDefault();
                evt.stopPropagation();

                $('table').find('.rpt28_row' + boxNum).toggle();                  
            });
        }

        var i;

        for (i = 1; i <= 5; i++) {
            assignClickHandlerFor(i);
        }        
 });​
$('#a' + boxNum).click(function () {
   $('.rpt28_row' + boxNum).toggle()
}