TAG
CSS
JavaScript
Result
Run
License
<h1>How to spend a hot summer.</h1> <p>Let's find a way to get through the hot summer.</p> <h2>Leave for the beach.</h2> <table> <thead> <tr> <th>Locale</th> <th>Beach</th> </tr> </thead> <tbody> <tr> <td>경기도</td> <td></td> </tr> <tr> <td>충청도</td> <td>변산해수욕장</td> </tr> <tr style="display: none;"> <td>강원도</td> <td>경포해수욕장</td> </tr> </tbody> </table>
table { border-collapse: collapse; } table th, table td { border: 1px solid #CCC; padding: 5px; }
$(function() { // 화면에 보여지는 요소 $("tr:visible").css("border-bottom", "2px solid #FF0000"); // 화면에 보여지지 않는 숨김 요소(display: none) $("tr:hidden").css("background", "#EAEAEA"); $(document).click(function() { // 출력 화면을 클릭하면 숨김 요소가 나타나며 앞서 숨김 요소에게 적용했던 스타일 확인 $("tr:hidden").fadeIn(); }); });
Console
expand_less
License
License
by DevDic
Close