Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
jQuery
Search
nctunba
March 21, 2012
Programming
630
8
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
jQuery
nctunba
March 21, 2012
More Decks by nctunba
See All by nctunba
被 Qt 快樂的玩弄
nctunba
2
420
被 Qt 快樂的玩弄 part 1
nctunba
1
310
Node - Express - Socket.io
nctunba
1
440
Python
nctunba
3
560
node
nctunba
9
50k
JS
nctunba
11
650
Other Decks in Programming
See All in Programming
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
220
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
320
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
130
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
アクセシビリティから考える情報設計
high_g_engineer
0
430
[ハンズオン]AIへの指示だけで「五目並べ」を作ってみよう
satoshi256kbyte
1
310
Agents on Rails - Rails at Scale 2026
irinanazarova
0
300
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.1k
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
400
テストを司るデーモンに会いに行く 〜隔離した仮想マシンでテストを通すまで〜
h1d3mun3
1
600
iOSDC2026登壇資料.pdf
riofujimon
0
200
Are APIs Still Relevant in the AI Era?
soyuka
0
380
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
New Earth Scene 8
popppiees
4
2.6k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
Visualization
eitanlees
153
17k
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Making the Leap to Tech Lead
cromwellryan
135
10k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
260
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
260
Designing Powerful Visuals for Engaging Learning
tmiket
1
580
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
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