Skip to Content
러닝 자바스크립트: ES6로 제대로 입문하는 모던 자바스크립트 웹 개발
book

러닝 자바스크립트: ES6로 제대로 입문하는 모던 자바스크립트 웹 개발

by 한선용, 이선 브라운
July 2017
Beginner to intermediate
464 pages
10h 38m
Korean
Hanbit Media, Inc.
Content preview from 러닝 자바스크립트: ES6로 제대로 입문하는 모던 자바스크립트 웹 개발
395
19
제이쿼리
$(
document
).
ready
(
function
() {
// 여기 있는 코드는
HTML
을 모두 불러오고
//
DOM
이 구성된 다음 실행됩니다.
});
위 코드는 여러 번 써도 안전하므로, 제이쿼리 코드를 몇 개로 나누어 써도 모두
DOM
을 불러
온 뒤에 실행됩니다. 다음과 같은 단축 표기도 있습니다.
$(
function
() {
// 여기 있는 코드는
HTML
을 모두 불러오고
//
DOM
이 구성된 다음 실행됩니다.
});
제이쿼리를 사용할 때는 코드를 모두 이런 블록에 넣을 때가 아주 많습니다.
19.4
제이쿼리로 감싼
DOM
요소
제이쿼리로
DOM
을 조작할 때 가장 많이 쓰는 방법은
제이쿼리로
DOM
요소를 감싸는
wrap
입니다. 제이쿼리로
DOM
을 조작할 때는 우선
DOM
요소 셋
set
(셋이라고 했지만, 요소 하
나만 있을 때도 있고 아예 없을 때도 있습니다 )을 감싸는 제이쿼리 객체를 만듭니다.
제이쿼리 함수(
$
이나
jQuery
)
DOM
요소 셋을 감싼 것을 제이쿼리 객체라고 부릅니다. 제
이쿼리 함수를 호출할 때는 주로
CSS
선택자나
HTML
을 사용합니다.
CSS
선택자로 제이쿼리를 호출하면 해당 선택자에 일치하는 제이쿼리 객체가 반환됩니다. 이
객체는
document
.
querySelectorAll
이 반환하는 컬렉션과 거의 비슷합니다. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

웹 애플리케이션 보안: 정찰, 공격, 방어 세 단계로 배우는 웹 애플리케이션 보안의 모든 것

웹 애플리케이션 보안: 정찰, 공격, 방어 세 단계로 배우는 웹 애플리케이션 보안의 모든 것

최용, 앤드루 호프먼

Publisher Resources

ISBN: 9788968483387