Overview In the�last article�about�unobtrusiveJavaScript, we learned how to use�event delegation�and markup-driven behavior tocreate reusableJavaScript components. This article will explore how to use custom events in jQuery to give the developer even greater control over the component’s behavior. While many facets of an�unobtrusive widget�can be controlled via the markup (data attributes), we
Observed events var events = 'click mouseover mouseout'; $('.div-1').on(events, testOne); $('.div-0').on(events, '.div-1', testTwo); Inside function testOne (e) e.currentTarget = ? e.delegateTarget = ? e.relatedTarget = ? e.target = ? e.type = ? Inside function testTwo (e) e.currentTarget = ? e.delegateTarget = ? e.relatedTarget = ? e.target = ? e.type = ?
The Difference Between jQuery's .bind(), .live(), and .delegate() The difference between .bind(), .live(), and .delegate() is not always apparent. Having a clear understanding of all the differences, though, will help us write more concise code and prevent bugs from popping up in our interactive applications. The jQuery team have announced in v1.7 a new method for binding events called on. This me
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く