JQuery not()

2020/JQuery 2020. 3. 6. 12:24
반응형
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    <script>
      $(document).ready(function() {
        $("p")
          .not(".intro")
          .css("background-color", "yellow");
      });
    </script>
    <title>Document</title>
  </head>
  <body>
    <h1>Welcome to My Hompage</h1>
    <p>이번에는 NOT을 공부할거야</p>
    <p class="intro">NOT알지?</p>
    <p class="intro">not은 부정이잖아?</p>
    <p>위에 스크립트 소스를 보면 이해될거야^^*</p>
  </body>
</html>
반응형

'2020 > JQuery' 카테고리의 다른 글

JQuery children, parent, parents, siblings  (0) 2020.03.06
JQuery 현재요소, 다음요소, next(), nextAll()  (0) 2020.03.06
jquery animation stop  (0) 2020.03.06
JQuery 엘리먼트 순서 알아내기  (0) 2020.03.05
JQuery height, width  (0) 2020.03.05
블로그 이미지

꽃꽂이하는개발자

,