File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ var pjax = $.pjax = function( options ) {
166
166
xhr . abort ( )
167
167
}
168
168
169
+ pjax . options = options
169
170
pjax . xhr = $ . ajax ( options )
170
171
$ ( document ) . trigger ( 'pjax' , [ pjax . xhr , options ] )
171
172
@@ -184,15 +185,15 @@ pjax.defaults = {
184
185
type : 'GET' ,
185
186
dataType : 'html' ,
186
187
beforeSend : function ( xhr ) {
187
- this . trigger ( 'start.pjax' , [ xhr , options ] )
188
+ this . trigger ( 'start.pjax' , [ xhr , pjax . options ] )
188
189
xhr . setRequestHeader ( 'X-PJAX' , 'true' )
189
190
} ,
190
191
error : function ( xhr , textStatus , errorThrown ) {
191
192
if ( textStatus !== 'abort' )
192
- window . location = options . url
193
+ window . location = pjax . options . url
193
194
} ,
194
- complete : function ( ) {
195
- this . trigger ( 'end.pjax' , [ xhr , options ] )
195
+ complete : function ( xhr ) {
196
+ this . trigger ( 'end.pjax' , [ xhr , pjax . options ] )
196
197
}
197
198
}
198
199
You can’t perform that action at this time.
0 commit comments