[jQuery]Hello World
개발관련/jQuery 2012. 3. 12. 14:27 |1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <style type= "text/css" > .bg { background-color:Yellow; } .sil { background-color:Silver; } </style> <script src= "js/jquery-1.3.2-vsdoc2.js" type= "text/javascript" ></script> <script type= "text/javascript" > $(document).ready( function () { // 페이지가 준비되었을 때 $( '#hw' ).addClass( "bg" ); // hw라는 id속성을 가지는 레이어를 가져와 그것에 bg CSS 클래스 적용 $( '#hw' ).click( function () { alert( '안녕' ); $( this ).addClass( "sil" ); }); }); </script> <div style= "background-color:Yellow;" onclick= "alert('안녕');" > 안녕하세요. jQuery!!! </div> <div class= "bg" > 안녕하세요. jQuery!!! </div> <div id= "hw" > 안녕하세요. jQuery!!! </div> |
안녕하세요. jQuery!!!
안녕하세요. jQuery!!!
안녕하세요. jQuery!!!
'개발관련 > jQuery' 카테고리의 다른 글
[jQuery]특정 텍스트 검색 (0) | 2012.03.12 |
---|---|
[jQuery]테이블의 짝수번째 배경색 변경 (0) | 2012.03.12 |
[jQuery]jQuery selector A ~ Z (0) | 2012.03.12 |
[jQuery]정규표현식 selector (0) | 2012.03.12 |
[jQuery]selector 선택자/선택기/실렉터/셀렉터 (0) | 2012.03.12 |