제이쿼리는 자바스크립트에서 달러 기호를 식별자로 쓸 수 있다는 장점을 활용한 첫 번째 라이
브러리 중 하나입니다. 달러 기호를 사용하기로 한 결정은 처음에는 자만하는 것으로 보였을
수 있지만, 지금은 제이쿼리가 어디서든 쓰이므로 미래를 내다본 결정이라고 할 수 있습니다.
프로젝트에서 제이쿼리를 사용할 때는
jQuery
나
$
1
을 씁니다. 이 책에서는
$
를 쓰겠습니다.
19.2
제이쿼리 불러오기
제이쿼리를 불러오는 가장 쉬운 방법은
CDN
을 이용하는 겁니다.
<
script
src
="
http
://
code
.
jquery
.
com
/
jquery
-
2
.
1
.
4
.
min
.
js
"></
script
>
제이쿼리는
2
.
x
버전부터 인터넷 익스플로러
8
이하에 대한 지원을 중단했습니다. 인터넷 익스플로
러 구 버전을 지원해야 한다면 제이쿼리
1
.
x
버전을 써야 합니다. 제이쿼리
2
.
x
버전에서는 오래된 브라우저
버전을 포기하면서 훨씬 작고 단순해졌습니다.
19.3
DOM
기다리기
브라우저가
HTML
파일을 읽고 해석하고 렌더링하는 과정은 복잡합니다. 경험이 부족한 웹 개
발자는 브라우저가
DOM
을 구축하기도 전에 요소에 접근하려 하다가 에러를 겪는 일이 많습
니다.
제이쿼리에서는 브라우저가 페이지를 완전히 읽고
DOM
을 구축한 다음에만 ...
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.
O’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
I 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
I’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
I'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.