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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
410
被 Qt 快樂的玩弄 part 1
nctunba
1
310
Node - Express - Socket.io
nctunba
1
440
Python
nctunba
3
550
node
nctunba
9
50k
JS
nctunba
11
650
Other Decks in Programming
See All in Programming
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
4
1.7k
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
19k
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
820
Go 1.27 における memory allocation の高速化
andpad
0
260
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.9k
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
190
Foundation Models frameworkで画像分析
ryodeveloper
1
630
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.9k
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
110
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
150
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
320
Building a Meta Ray-Ban display app
akkeylab
0
170
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
GitHub's CSS Performance
jonrohan
1033
470k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
66
57k
A Soul's Torment
seathinner
6
3.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
940
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
450
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
210
VelocityConf: Rendering Performance Case Studies
addyosmani
332
25k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Building Adaptive Systems
keathley
44
3.2k
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