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 bind(), live(), delegate(), on() clarifi...
Search
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
570
SSH Can
oursky
1
350
HTTP/2
oursky
0
400
watchOS2
oursky
0
380
Common QA issues
oursky
0
260
Complex is better than complicated
oursky
0
330
Clean code again
oursky
3
430
KiriKiri x O2 x NVLMarker
oursky
0
280
Flux + React
oursky
1
420
Other Decks in Programming
See All in Programming
残高管理から台帳サービスへの進化
artoy
1
200
すこし踏み込む CancellationToken
htkym
2
1.7k
AWSに止められる覚悟してますか?
morizo_1984
2
530
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
200
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
210
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
550
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
640
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Jetpack Compose Mechanisms
skydoves
3
820
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
How to make the Groovebox
asonas
2
2.5k
Between Models and Reality
mayunak
4
500
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
580
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
HDC tutorial
michielstock
2
960
Evolving SEO for Evolving Search Engines
ryanjones
0
330
Building Adaptive Systems
keathley
44
3.2k
Darren the Foodie - Storyboard
khoart
PRO
4
4k
Become a Pro
speakerdeck
PRO
31
6.3k
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/