[jQuery]hover()로 마우스오버와 아웃을 동시 처리
개발관련/jQuery 2012. 3. 13. 13:35 |1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <style type= "text/css" > .hover { cursor:hand; background-color:Yellow; } </style> <script src= "js/jquery-1.3.2-vsdoc2.js" type= "text/javascript" ></script> <script type= "text/javascript" > $(document).ready( function () { $( 'table tr:gt(0)' ).hover( function () { $( this ).addClass( 'hover' ); }, function () { $( this ).removeClass( 'hover' ); } ); }); </script> <table border= "1" > <tbody><tr> <td>제목</td> </tr> <tr> <td>ASP.NET</td> </tr> <tr> <td>ASP.NET</td> </tr> </tbody></table> |
제목 |
ASP.NET |
ASP.NET |
'개발관련 > jQuery' 카테고리의 다른 글
[jQuery]폰트 늘리기 및 줄이기 (0) | 2012.03.13 |
---|---|
[jQuery]one()메서드로 한번만 실행 (0) | 2012.03.13 |
[jQuery]toggleClass() 메서드로 CSS 클래스에 대한 토그링 (0) | 2012.03.13 |
[jQuery]toggle() 메서드로 토글링 (0) | 2012.03.13 |
[jQuery]slice() 메서드로 지정된 개체만 가져오기 (0) | 2012.03.12 |