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 bind(), live(), delegate(), on() clarifi...
Search
Oursky Limited
March 19, 2012
Programming
2
120
jQuery bind(), live(), delegate(), on() clarification
Oursky Limited
March 19, 2012
Tweet
Share
More Decks by Oursky Limited
See All by Oursky Limited
UI Automation
oursky
1
510
SSH Can
oursky
1
330
HTTP/2
oursky
0
360
watchOS2
oursky
0
350
Common QA issues
oursky
0
210
Complex is better than complicated
oursky
0
290
Clean code again
oursky
3
380
KiriKiri x O2 x NVLMarker
oursky
0
250
Flux + React
oursky
1
400
Other Decks in Programming
See All in Programming
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
170
CSC307 Lecture 06
javiergs
PRO
0
680
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
370
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
6
1.8k
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
190
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
680
ThorVG Viewer In VS Code
nors
0
770
Fragmented Architectures
denyspoltorak
0
150
CSC307 Lecture 07
javiergs
PRO
0
550
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
610
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
225
10k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
270
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Odyssey Design
rkendrick25
PRO
1
490
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
410
Marketing to machines
jonoalderson
1
4.6k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
WENDY [Excerpt]
tessaabrams
9
36k
Transcript
Oursky Weekly Presentation jQuery bind(), live(), delegate(), on() clarification
Web View... Starting with sample code.. HTML...
Simple Binding JS... Notes Most common binding Attaches the event
handler to every matched elements Doesn’t work for dynamic elements added later on (such as ajax)
Live() JS... Notes Similar syntax Binding still works when dynamic
elements added later on Attached the event handler to “document” once StopPropagation not working already because the event is propagated to the root to handle already Have performance issues
Delegate() JS... Notes Only bind to selected root element The
event still propagated from target element to selected root element, but it is much better than live()
On() bind(), live() and delegate() just become one line call
in jQuery 1.7, as well as their unbinding methods
Custom events? JS... Notes It also works on custom binding
events!
Credits Web Dev .NET - Differences Between jQuery .bind() vs
.live() vs .delegate() vs .on() http://www.elijahmanor.com/2012/02/differences-between-jquery-bind-vs-live.html jQuery on() http://api.jquery.com/on/