Opened 14 years ago
Closed 12 years ago
#4994 closed feature (worksforme)
new ajax 'target' option upon which ajaxEvents are triggered, when specified
Reported by: | nbubna | Owned by: | flesler |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | ajax | Version: | 1.3.2 |
Keywords: | ajax events load trigger | Cc: | nbubna |
Blocked by: | Blocking: |
Description
Supports a new 'target' option for $.ajax. When specified, all ajax events (ajaxStart and such) are triggered on that, instead of being globally triggered. For $.fn.load calls (and plugins that do similar things), this provides a means to identify the element upon which the ajax action is being done.
See: http://groups.google.com/group/jquery-dev/browse_thread/thread/caf31f67a3ac159c
Attachments (2)
Change History (6)
Changed 14 years ago by
Attachment: | jquery4994.patch added |
---|
comment:1 Changed 14 years ago by
Cc: | nbubna added |
---|---|
need: | Review → Patch |
Owner: | set to flesler |
Status: | new → assigned |
Type: | enhancement → feature |
Changed 14 years ago by
Attachment: | ajax.patch added |
---|
comment:3 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Function $(selector).load() was modified in changeset [6563] in order to use the DOM element as the context of the call to $.ajax.
Looking at jQuery most recent source code, it looks like this change was reverted:
http://github.com/jquery/jquery/blob/master/src/ajax.js#L56
Is there a reason for that?
comment:4 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
If you need a context for an operation, you have to do it manually through $.ajax
. Automatic context change for the global events is never provided, consistently.
Suggested implementation