Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
jQuery
Search
nctunba
March 21, 2012
Programming
8
620
jQuery
nctunba
March 21, 2012
Tweet
Share
More Decks by nctunba
See All by nctunba
被 Qt 快樂的玩弄
nctunba
2
400
被 Qt 快樂的玩弄 part 1
nctunba
1
290
Node - Express - Socket.io
nctunba
1
420
Python
nctunba
3
530
node
nctunba
9
50k
JS
nctunba
11
650
Other Decks in Programming
See All in Programming
「ブロックテーマでは再現できない」は本当か?
inc2734
0
680
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
180
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
170
Oxlintはいいぞ
yug1224
5
1.3k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
980
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
190
Architectural Extensions
denyspoltorak
0
280
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
250
AI巻き込み型コードレビューのススメ
nealle
0
130
Featured
See All Featured
Being A Developer After 40
akosma
91
590k
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
Practical Orchestrator
shlominoach
191
11k
Designing Experiences People Love
moore
144
24k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
96
Building a Scalable Design System with Sketch
lauravandoore
463
34k
The Curse of the Amulet
leimatthew05
1
8.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
130
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
88
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Transcript
jQuery
$
write less, do more
JavaScript Library
Client-side Scripting
Saves people's lifes since 2006
Does the dirty work for you
by “dirty work”, I mean W3C DOM
Document Object Model
Object Model for Documents
Object Model for HTML
HTML <=> DOM
HTML <=> DOM
HTML <=> DOM <=> JS
API between HTML & JS
W3C DOM
ugly & tedious
jQuery
jQuery Manipulation Attributes Effects Selectors Traversing Plugins Ajax Events
Install
None
<html> <head> <script src=”path/to/jquery”></script> </head> <body> </body> </html>
Hello World
DOM is a tree
|-> Document |-> <html> |-> <body> |-> <h1> |-> text
node |-> <p> |-> <a> |-> <br> |-> <a>
$('h1').text('hello world')
$('h1').text('hello world') Select and manipulate
$('h1').text('hello world') Select and manipulate
$ I am jQuery
$('h1') the Selector
.text('hello world') Set text
.text() Get text
var text = $('h1').text(); console.log(text);
$('h1') .text('hello') .fadeOut(); Chaining!
Selectors
Selects the nodes in the tree
Act just like CSS Selectors
$('h1') All h1 elements
$('p') All p elements
$('h1.banana') All h1 elements with class banana
$('h1#chuck') All h1 elements with id chuck
$('.banana') All elements with class banana
$('[type=”text”]') All elements with attribute type = text
Manipulations
Play with a node
CSS
How a node looks like
Traversing
Visit other nodes
Events
Nodes are responsive
$(...).someEvent(callback)
Ajax
Grabs you data