tdをslideToggleする
<div id="tdSlideToggleSample"> <table> <tr> <th class="thTrigger">Click me to show.</th> <td style="display:none">Can you see me?</td> </tr> </table> <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> <script> $(function(){ $(".thTrigger").click( function() { $(this).next().slideToggle(125); }); }); </script> </div>
Click me to show. |
---|
うにょってさせる
<div id="tdSlideToggleSample2"> <table> <tr> <th class="thTrigger2">Click me to show.</th> <td><span style="display:none">Can you see me?</span></td> </tr> </table> <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> <script> $(function(){ $(".thTrigger2").click( function() { $(this).next().children("span").slideToggle(225); }); }); </script> </div>
Click me to show. |
---|
なんかへん。