File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 30
30
this . isBound = false ;
31
31
this . isPaused = false ;
32
32
this . isInitialized = false ;
33
+ this . jsXhr = false ;
33
34
this . listeners = {
34
35
next : new IASCallbacks ( ) ,
35
36
load : new IASCallbacks ( ) ,
186
187
187
188
self . fire ( 'load' , [ loadEvent ] ) ;
188
189
189
- return $ . get ( loadEvent . url , null , $ . proxy ( function ( data ) {
190
+ this . jsXhr = $ . get ( loadEvent . url , null , $ . proxy ( function ( data ) {
190
191
$itemContainer = $ ( this . itemsContainerSelector , data ) . eq ( 0 ) ;
191
192
if ( 0 === $itemContainer . length ) {
192
193
$itemContainer = $ ( data ) . filter ( this . itemsContainerSelector ) . eq ( 0 ) ;
211
212
}
212
213
}
213
214
} , self ) , 'html' ) ;
215
+
216
+ return this . jsXhr ;
214
217
} ;
215
218
216
219
/**
456
459
* @public
457
460
*/
458
461
IAS . prototype . destroy = function ( ) {
462
+ try {
463
+ this . jsXhr . abort ( ) ;
464
+ } catch ( e ) { }
465
+
459
466
this . unbind ( ) ;
460
467
461
468
this . $scrollContainer . data ( 'ias' , null ) ;
You can’t perform that action at this time.
0 commit comments