javascript - What is the difference between “this”, “$this” and “$(this)”? -
what difference between these 3 forms:
this $this $(this)
in typical usage you'll see them (the $this usage may vary):
this- refers dom element in handler you're on, may object entirely in other situations, it's context.$this- createdvar $this = $(this)cached version of jquery wrapped version efficiency (or chain off$(this)same in many cases).$(this)- jquery wrapped version of element, have access all methods (the ones in$.fnspecifically).
Comments
Post a Comment