Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#7909 closed bug (duplicate)

toggle(fn,fn) bug

Reported by: shuibiwoku@… Owned by: shuibiwoku@…
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by addyosmani)

<table>
            <thead>
                <tr>
                    <th>
                        姓名
                    </th>
                    <th>
                        性别
                    </th>
                    <th>
                        暂住地
                    </th>
                </tr>
            </thead>
            <tbody>
                <tr class="parent" id="row_01">
                    <td colspan="3">
                        前台设计组
                    </td>
                </tr>
                <tr class="child_row_01">
                    <td>
                        张三
                    </td>
                    <td>
                        男
                    </td>
                    <td>
                        浙江宁波
                    </td>
                </tr>
                <tr class="child_row_01">
                    <td>
                        李四
                    </td>
                    <td>
                        女
                    </td>
                    <td>
                        浙江杭州
                    </td>
                </tr>
                <tr class="parent" id="row_02">
                    <td colspan="3">
                        前台开发组
                    </td>
                </tr>
                <tr class="child_row_02">
                    <td>
                        王五
                    </td>
                    <td>
                        男
                    </td>
                    <td>
                        湖南长沙
                    </td>
                </tr>
                <tr class="child_row_02">
                    <td>
                        赵六
                    </td>
                    <td>
                        男
                    </td>
                    <td>
                        浙江温州
                    </td>
                </tr>
                <tr class="parent" id="row_03">
                    <td colspan="3">
                        后台开发组
                    </td>
                </tr>
                <tr class="child_row_03">
                    <td>
                        Rain
                    </td>
                    <td>
                        男
                    </td>
                    <td>
                        浙江杭州
                    </td>
                </tr>
                <tr class="child_row_03">
                    <td>
                        MaxMan
                    </td>
                    <td>
                        女
                    </td>
                    <td>
                        浙江杭州
                    </td>
                </tr>
            </tbody>
        </table>
<script type="text/javascript">
    $(function() {
        $("tr.parent").click(function() {
            var trs = $(this).siblings(".child_" + this.id);
            
            trs.toggle(function() { trs.hide("normal"); }, function() {
                trs.show("normal");
            });
        });

    });

</script>
{{{

}}}

Change History (3)

comment:1 Changed 9 years ago by addyosmani

Description: modified (diff)
Owner: set to shuibiwoku@…
Status: newpending

Thanks for submitting a ticket to the jQuery Bug Tracker. In order for us to assist in evaluating this bug further we will need to do the following: 1) Post a summary of the information about this bug in more detail so we know exactly what may be failing and 2) Post a complete example of your code on [jsFiddle http://jsfiddle.net] that reproduces the issue. Thanks!

comment:2 Changed 9 years ago by addyosmani

Resolution: duplicate
Status: pendingclosed

Original submitter has posted a new ticket rather than updating this one. Closing as a dupe.

comment:3 Changed 9 years ago by addyosmani

Duplicate of #7916.

Note: See TracTickets for help on using tickets.