mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Scroller: prevent error on destroy when not applied. See #965
This commit is contained in:
parent
dd80e3c88f
commit
7b8553068d
@ -880,8 +880,10 @@ ts.scroller = {
|
||||
remove : function( c, wo ) {
|
||||
var $wrap = wo.scroller_$container,
|
||||
namespace = c.namespace + 'tsscroller';
|
||||
c.$table.off( namespace );
|
||||
$( window ).off( namespace );
|
||||
if ( $wrap ) {
|
||||
c.$table
|
||||
.off( namespace )
|
||||
.insertBefore( $wrap )
|
||||
.find( 'thead' )
|
||||
.removeClass( tscss.scrollerHideElement )
|
||||
@ -896,9 +898,9 @@ ts.scroller = {
|
||||
.not( '.' + tscss.filterDisabled )
|
||||
.prop( 'disabled', false );
|
||||
$wrap.remove();
|
||||
$( window ).off( namespace );
|
||||
c.isScrolling = false;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user