如何隐藏跨越列中的相应td子项

时间:2011-12-08 10:42:37

标签: jquery

此处表头包含rowspan和column span。如何在点击标题栏中的隐藏链接时隐藏相应的子广告

<table border="1" cellspacing="1" cellpadding="1"> 
<tbody>
        <tr>
            <th colspan="6" align="middle">
                Vaccine Catch-up Schedule for Children 4 Months to 6 Years of Age
                <sup><a class="small" href='javascript:showSection("bibliography_DIV");setJumpPosition("fandc-atoz1041.b1")'>1</a></sup>
            </th> /* Column and Row Span header */
        </tr>
        <tr>
            <th rowspan="2" align="middle" id="test">
                Vaccine
                <a href="#">Hide</a>
            </th>
            <th rowspan="2" align="middle">
                Minimum age<br>
                for dose 1
                <a href="#">Hide</a> 
            </th>
            <th colspan="4" align="middle">
                Minimum interval between doses              
            </th>
        </tr>
        <tr>
            <th align="middle">
                Dose 1 to dose 2
                <a href="#">Hide</a>
            </th>
            <th align="middle">
                Dose 2 to dose 3
                <a href="#">Hide</a>
            </th>
            <th align="middle">
                Dose 3 to dose 4
                <a href="#">Hide</a>
            </th>
            <th align="middle">
                Dose 4 to dose 5
                <a href="#">Hide</a>
            </th>
        </tr>
        <tr>
            <td align="left">
                Hep B<sup>a</sup>
                <a href="#">Hide</a>
            </td>
            <td align="left">
                birth
            </td>
            <td align="left">
                4 wk
            </td>
            <td align="left">
                <b>8 wk</b><br>
                (and = 16 wk<br>
                after first dose)
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td align="left">
                Rotavirus<sup>b</sup>
            </td>
            <td align="left">
                6 wk
            </td>
            <td align="left">
                4 wk
            </td>
            <td align="left">
                4 wk<sup>b</sup>
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td align="left">
                DTaP<sup>c</sup>
            </td>
            <td align="left">
                6 wk
            </td>
            <td align="left">
                4 wk
            </td>
            <td align="left">
                4 wk
            </td>
            <td align="left">
                6 mo
            </td>
            <td align="left">
                6 mo<sup>c</sup>
            </td>
        </tr>
        <tr>
            <td align="left">
                Hib<sup>d</sup>
            </td>
            <td align="left">
                6 wk
            </td>
            <td align="left">
                <b>4 wk:</b><br>
                if first dose administered
                <br>
                at &lt; 12 mo of age<br>
                <b>8 wk (as final dose):</b><br>
                if first dose administered
                <br>
                at 12 to 14 mo of age<br>
                <b>No further doses needed:</b><br>
                if first dose administered
                <br>
                at =&nbsp;15 mo of age
            </td>
            <td align="left">
                <b>4 wk<sup>d</sup>:</b><br>
                if currently &lt;&nbsp;12 mo of age<br>
                <b>8 wk (as final dose)</b><sup>d</sup>:<br>
                if currently = 12 mo of age<br>
                and second dose administered
                <br>
                at &lt; 15 mo of age<br>
                <b>No further doses needed:</b><br>
                if previous dose administered
                <br>
                at = 15 mo of age
            </td>
            <td align="left">
                <b>8 wk (as final dose):</b><br>
                only necessary
                <br>
                for children 12
                <br>
                to 59 mo of age who received
                <br>
                3 doses before
                <br>
                12 mo of age
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td align="left">
                Pneumococcal<sup>e</sup>
            </td>
            <td align="left">
                6 wk
            </td>
            <td align="left">
                <b>4 wk:</b><br>
                if first dose administered at
                <br>
                &lt; 12 mo of age<br>
                <b>8 wk (as final dose for
                    <br>
                    healthy children):</b><br>
                if first dose administered
                <br>
                at = 12 mo of age or
                <br>
                currently 24 to 59 mo of age<br>
                <b>No further doses needed:</b><br>
                for healthy children
                <br>
                if first dose administered
                <br>
                at = 24 mo of age
            </td>
            <td align="left">
                <b>4 wk:</b><br>
                if currently &lt; 12 mo of age<br>
                <b>8 wk (as final dose for
                    <br>
                    healthy children):</b><br>
                if currently =&nbsp;12 mo of age<br>
                <b>No further doses needed:</b><br>
                for healthy children<br>
                if previous dose administered
                <br>
                at = 24 mo of age
            </td>
            <td align="left">
                <b>8 wk (as final dose):</b><br>
                only necessary<br>
                for children 12 to 59 mo<br>
                of age who received 3 doses
                <br>
                before 12 mo of age or for
                <br>
                high-risk children<br>
                who received 3 doses
                <br>
                at any age
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
<tr>
            <td colspan="6" align="middle">
                <b>Catch-up Schedule for Children 7 to 18 Years of Age</b>
            </td>
        </tr>

        <tr>
            <td align="left">
                IPV<sup>f</sup>
            </td>
            <td align="left">
                6 wk
            </td>
            <td align="left">
                4 wk
            </td>
            <td align="left">
                4 wk
            </td>
            <td align="left">
                4 wk<sup>f</sup>
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td align="left">
                MMR<sup>g</sup>
            </td>
            <td align="left">
                12 mo
            </td>
            <td align="left">
                4 wk
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td align="left">
                Varicella<sup>h</sup>
            </td>
            <td align="left">
                12 mo
            </td>
            <td align="left">
                3 mo
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
            <td align="left">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            </td>
        </tr>

    </tbody>
</table>

如果是动态的行和列跨越标题,是否可以检索标题列的相应td子项?

0 个答案:

没有答案