Opened 12 years ago
Closed 12 years ago
#6144 closed bug (wontfix)
tabs ajaxOptions should extend $.ajaxSettings
Reported by: | dmuir | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.0 |
Component: | ui.tabs | Version: | 1.8.5 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Because of the way that tabs initiates an ajax request for tab content, the default ajax success and error handlers are lost.
To get them back I need to do:
$('.tabs').tabs({ ajaxOptions: { success : $.ajaxSettings.success, error : $.ajaxSettings.error } });
Would be nice if the defaults actually acted as defaults rather than having to explicitly tell it to use it.
Change History (2)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Milestone: | TBD → 1.9 |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
ajaxOptions is being deprecated and fixing this could be a breaking change. The new API doesn't have this problem.
Note: See
TracTickets for help on using
tickets.
http://jsfiddle.net/gnarf/dYaSq/ Shows us some weird behavior with this for sure... However I'd like to point out the suggestion from http://api.jquery.com/jQuery.ajaxSetup:
Note: Global callback functions should be set with their respective global Ajax event handler methods—.ajaxStart(), .ajaxStop(), .ajaxComplete(), .ajaxError(), .ajaxSuccess(), .ajaxSend()—rather than within the options object for $.ajaxSetup().
Also note that it appears for some reason the ajaxSuccess is being called twice...