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
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
4
260
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
250
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
CSC307 Lecture 06
javiergs
PRO
0
680
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
660
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
450
ぼくの開発環境2026
yuzneri
0
160
CSC307 Lecture 05
javiergs
PRO
0
500
生成AIを使ったコードレビューで定性的に品質カバー
chiilog
1
260
MUSUBIXとは
nahisaho
0
130
Featured
See All Featured
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
100
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Evolving SEO for Evolving Search Engines
ryanjones
0
120
Imperfection Machines: The Place of Print at Facebook
scottboms
269
14k
WCS-LA-2024
lcolladotor
0
450
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
250
Facilitating Awesome Meetings
lara
57
6.7k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
200
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
Making Projects Easy
brettharned
120
6.6k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
63
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