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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Oursky Limited
March 19, 2012
Programming
120
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
jQuery bind(), live(), delegate(), on() clarification
Oursky Limited
March 19, 2012
More Decks by Oursky Limited
See All by Oursky Limited
UI Automation
oursky
1
560
SSH Can
oursky
1
350
HTTP/2
oursky
0
380
watchOS2
oursky
0
380
Common QA issues
oursky
0
240
Complex is better than complicated
oursky
0
320
Clean code again
oursky
3
410
KiriKiri x O2 x NVLMarker
oursky
0
270
Flux + React
oursky
1
420
Other Decks in Programming
See All in Programming
いまどきの Codex で開発する visionOS アプリの開発スタイルについて
karad
0
140
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
200
「人を評価する AI」の設計と実装
ryoyanara
0
200
Flow は今どうなっているか
mizdra
PRO
0
560
yield再入門 #phpcon
o0h
PRO
0
1.1k
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
210
FDEが実現するAI駆動経営の現在地
gonta
2
280
SlackアプリとLambdaの 連携を構築した話
pawn_4_s
1
120
Go 1.27 における memory allocation の高速化
andpad
0
180
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
490
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
150
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
140
Featured
See All Featured
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
390
Test your architecture with Archunit
thirion
1
2.3k
A Modern Web Designer's Workflow
chriscoyier
698
190k
What does AI have to do with Human Rights?
axbom
PRO
1
2.3k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Designing for Performance
lara
611
70k
Unsuck your backbone
ammeep
672
58k
Abbi's Birthday
coloredviolet
3
9.3k
Into the Great Unknown - MozCon
thekraken
41
2.7k
Done Done
chrislema
186
16k
Fireside Chat
paigeccino
42
4k
Statistics for Hackers
jakevdp
799
230k
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/