|
Append.htm |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title> 특정용어에 대해서 번호 붙히기 </title> <style type="text/css"> .Chapter { background-color:Silver;} .Content { height:100px ;} </style> <script src="../../jquery-1[1].3.2-vsdoc2.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { //[1] term CSS 클래스에 배경색 붙이기 $('.term').not(":odd").css("backgroundColor", "Yellow") .end() .filter(":odd").css("background-color", "LightBlue"); //[2]각각의 용어 뒤에 번호 붙이기 $(this).append("<sup>" + (i + 1) + "</sup>"); }); }); </script> </head> <body> <h3> jQuery UI provides abstractions </h3> <div> <span class="term"> jQuery </span> UI provides abstractions for low-level<span class="term"> JavaScript </span> interaction and animation, advanced effects and high-level,<span class="term"> HTML </span> themeable widgets, built on top of the jQuery JavaScript Library, that<span class="term"> SilverLight </span> you can use to build highly interactive web applications </div> </body> </html> |
'.Net Project > Jquery 1.3.2' 카테고리의 다른 글
42장 JQueryManipulation 검색된 요소 복사 (Clone) (0) | 2009.11.11 |
---|---|
41장 JQueryManipulation 검색 요소 특정 태그로 감싸기 (Wrap) (0) | 2009.11.11 |
39장 JQueryManipulation 앞 뒤 요소 추가 (Insert After) (0) | 2009.11.11 |
38장 JQueryManipulation Append메서드 (Append) (0) | 2009.11.11 |
37장 JQueryTraversing End (End) (0) | 2009.11.10 |