- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.4k
Refactor: Ajax callback breakout
- 
The jQuery Mobile $.ajax()call lives injquery.mobile.navigation.jswithin a function named$.mobile.loadPage.
- 
The successanderrorcallbacks are defined inline within the$.ajax()call itself.
- 
The notion is breaking-out these callbacks would greatly improve jQuery Mobile extensibility by making the callbacks accessible. 
In order to split-out the success callback we'd need to address the following issues:
- 
Reference to memvar fileUrlwhich is defined in the$.mobile.loadPageclosure.fileurlis moreover dependent on memvarabsUrlwhich depends on$.mobile.loadPageparameterurl.
- 
Reference to memvar basewhich is defined in the$.mobile.loadPageclosure.
- 
Reference to memvar pagewhich is defined in the$.mobile.loadPageclosure. Memvarpageis derived from memvarsettingswhich is the result of the options passed-in to$.mobile.loadPagevia$.extend( {}, $.mobile.loadPage.defaults, options )
- 
Reference to memvar deferreddefined in the$.mobile.loadPageclosure.
- 
more (?) 
In order to split-out the error callback we'd need to address the following issues:
- 
Reference to memvar basewhich is defined in the$.mobile.loadPageclosure.
- 
Reference to memvar deferreddefined in the$.mobile.loadPageclosure.