From c2dbfd47690b486892421d953653a49c52400454 Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Sat, 28 Jan 2017 13:08:03 -0600 Subject: [PATCH] Scroller: add scrollerComplete event. Fixes #1351 --- dist/js/widgets/widget-scroller.min.js | 2 +- docs/example-widget-scroller.html | 42 ++++++++++++++++---------- js/widgets/widget-scroller.js | 1 + 3 files changed, 28 insertions(+), 17 deletions(-) diff --git a/dist/js/widgets/widget-scroller.min.js b/dist/js/widgets/widget-scroller.min.js index c6b00d5e..e3ade004 100644 --- a/dist/js/widgets/widget-scroller.min.js +++ b/dist/js/widgets/widget-scroller.min.js @@ -1,2 +1,2 @@ /*! Widget: scroller - updated 7/31/2016 (v2.27.0) */ -!function(a,b){"use strict";var c=a.tablesorter,d=c.css;a.extend(c.css,{scrollerWrap:"tablesorter-scroller",scrollerHeader:"tablesorter-scroller-header",scrollerTable:"tablesorter-scroller-table",scrollerFooter:"tablesorter-scroller-footer",scrollerFixed:"tablesorter-scroller-fixed",scrollerFixedPanel:"tablesorter-scroller-fixed-panel",scrollerHasFix:"tablesorter-scroller-has-fixed-columns",scrollerHideColumn:"tablesorter-scroller-hidden-column",scrollerHideElement:"tablesorter-scroller-hidden",scrollerSpacerRow:"tablesorter-scroller-spacer",scrollerBarSpacer:"tablesorter-scroller-bar-spacer",scrollerAddedHeight:"tablesorter-scroller-added-height",scrollerHack:"tablesorter-scroller-scrollbar-hack",scrollerRtl:"ts-scroller-rtl"}),c.addWidget({id:"scroller",priority:60,options:{scroller_height:300,scroller_jumpToHeader:!0,scroller_upAfterSort:!0,scroller_fixedColumns:0,scroller_rowHighlight:"hover",scroller_addFixedOverlay:!1,scroller_barWidth:null},format:function(a,b,d){b.isScrolling?c.scroller.resize(b,d):c.scroller.setup(b,d)},remove:function(a,b,d){c.scroller.remove(b,d)}}),c.window_resize=function(){c.timer_resize&&clearTimeout(c.timer_resize),c.timer_resize=setTimeout(function(){a(b).trigger("resizeEnd")},250)},a(function(){var b="";a("head").append(b)}),c.scroller={isFirefox:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isOldIE:document.all&&!b.atob,isIE:document.all&&!b.atob||navigator.appVersion.indexOf("Trident/")>0,isSafari:navigator.userAgent.toLowerCase().indexOf("safari")>-1&&navigator.userAgent.toLowerCase().indexOf("chrome")===-1,hasScrollBar:function(a,b){return b?a.get(0).scrollWidth>a.width():a.get(0).scrollHeight>a.height()},setWidth:function(a,b){a.css({width:b,"min-width":b,"max-width":b})},getBarWidth:function(){var b=a("
").css({position:"absolute",top:"-9999px",left:0,width:"100px",height:"100px",overflow:"scroll",visibility:"hidden"}).appendTo("body"),c=b[0],d=c.offsetWidth-c.clientWidth;return b.remove(),d},setup:function(e,f){var g,h,i,j,k,l,m,n,o,p=a(b),q=c.scroller,r=e.namespace+"tsscroller",s=a(),t=e.namespace.slice(1)+"tsscroller",u=e.$table;e.widthFixed=!0,f.scroller_calcWidths=[],f.scroller_saved=[0,0],f.scroller_isBusy=!0,null!==f.scroller_barWidth?f.scroller_barSetWidth=f.scroller_barWidth:(o=q.getBarWidth(),f.scroller_barSetWidth=null!==o?o:15),n=u.children("caption"),h=a(''+(n.length?n[0].outerHTML:"")+u.children("thead")[0].outerHTML+"
"),f.scroller_$header=h.addClass(e.namespace.slice(1)+"_extra_table"),i=u.children("tfoot"),i.length&&(s=a('
').addClass(e.namespace.slice(1)+"_extra_table").append(i.clone(!0)).wrap('
'),k=s.children("tfoot").eq(0).children("tr").children()),f.scroller_$footer=s,u.wrap('
').before(h).find("."+d.filterRow).addClass(d.filterRowHide),f.scroller_$container=u.parent(),s.length&&u.after(s.parent()),j=h.wrap('
').find("."+d.header),u.wrap('
':'">')),l=u.parent(),c.bindEvents(e.table,j),u.hasClass("hasFilters")&&c.filter.bindSearch(u,h.find("."+d.filter)),u.children("thead, caption").addClass(d.scrollerHideElement),g=l.parent().height(),l.off("scroll"+r).on("scroll"+r,function(){if(f.scroller_jumpToHeader){var b=p.scrollTop()-h.offset().top;0!==a(this).scrollTop()&&b0&&p.scrollTop(h.offset().top)}h.parent().add(s.parent()).scrollLeft(a(this).scrollLeft())}),m=((c.hasWidget(e.table,"filter")?"filterEnd":"tablesorter-initialized updateComplete")+" sortEnd pagerComplete columnUpdate ").split(" ").join(r+" "),u.off(r).on("sortEnd filterEnd".split(" ").join(r+" "),function(a){"sortEnd"===a.type&&f.scroller_upAfterSort?l.animate({scrollTop:0},"fast"):f.scroller_fixedColumns&&setTimeout(function(){l.scrollTop(f.scroller_saved[1]).scrollLeft(f.scroller_saved[0]),q.updateFixed(e,f)},0)}).on("setFixedColumnSize"+r,function(a,b){var c=f.scroller_$container;"undefined"==typeof b||isNaN(b)||(f.scroller_fixedColumns=parseInt(b,10)),q.removeFixed(e,f),b=f.scroller_fixedColumns,b>0&&b0&&q.updateFixed(e,f),q.resize(e,f))}),p.off("resize resizeEnd ".split(" ").join(r+" ")).on("resize"+r,c.window_resize).on("resizeEnd"+r,function(){p.off("resize"+r,c.window_resize),q.resize(e,f),p.on("resize"+r,c.window_resize),l.trigger("scroll"+r)}),e.isScrolling=!0,q.updateFixed(e,f),e.table.hasInitialized&&e.isScrolling&&setTimeout(function(){c.scroller.resize(e,f)},50)},resize:function(e,f){if(!f.scroller_isBusy){var g,h,i,j,k,l,m=c.scroller,n=f.scroller_$container,o=e.$table,p=o.parent(),q=f.scroller_$header,r=f.scroller_$footer,s=a(b),t=[s.scrollLeft(),s.scrollTop()],u=e.namespace.slice(1)+"tsscroller",v=a("div."+d.scrollerWrap+'[id!="'+u+'"]').addClass(d.scrollerHideElement),w='';for(f.scroller_calcWidths=[],m.removeFixed(e,f),n.find("."+d.scrollerSpacerRow).remove(),n.find("."+c.css.colgroup).remove(),o.find("."+d.scrollerHideElement).removeClass(d.scrollerHideElement),h=parseInt(o.css("border-left-width"),10),j=e.$headerIndexed,g=0;g',f.scroller_calcWidths[g]=i;w+="",e.$tbodies.eq(0).prepend(w),q.children("thead").append(w),r.children("tfoot").append(w),c.fixColumnWidth(e.table),w=e.$table.children("colgroup")[0].outerHTML,q.prepend(w),r.prepend(w),l=p.parent().innerWidth()-(m.hasScrollBar(p)?f.scroller_barSetWidth:0),p.width(l),l=(m.hasScrollBar(p)?f.scroller_barSetWidth:0)+h,i=p.innerWidth()-l,q.parent().add(r.parent()).width(i),p.width(i+l),o.children("thead, caption").addClass(d.scrollerHideElement),m.updateFixed(e,f),v.removeClass(d.scrollerHideElement),p.scrollTop(f.scroller_saved[1]),f.scroller_$container.find("."+d.scrollerFixed).find("."+d.scrollerTable).scrollTop(f.scroller_saved[1]),s.scrollLeft(t[0]),s.scrollTop(t[1]),setTimeout(function(){e.$table.triggerHandler("resizableUpdate")},100)}},setupFixed:function(a,b){var e,f,g,h,i,j,k,l=a.$table,m=b.scroller_$container,n=b.scroller_fixedColumns;for(j=m.addClass(d.scrollerHasFix).clone().addClass(d.scrollerFixed).removeClass(d.scrollerWrap).attr("id",""),j.find("caption").html(" "),b.scroller_addFixedOverlay&&j.append('
'),k=j.find("."+d.scrollerTable),k.children("table").addClass(a.namespace.slice(1)+"_extra_table").attr("id","").children("thead, tfoot").remove(),b.scroller_$fixedColumns=j,l.hasClass(d.scrollerRtl)&&j.addClass(d.scrollerRtl),g=j.find("tr"),h=g.length,e=0;e')},throttle:function(a,b,c){b=b||50;var d,e;return function(){var f=c||this,g=+new Date,h=arguments;d&&g tr").on(h,"tbody > tr",function(a){var c=b.$table.children("tbody").children("tr").index(this);i.children("table").children("tbody").children("tr").eq(c).add(this).toggleClass(e.scroller_rowHighlight,"mouseover"===a.type)}),i.find("table").off(h,"tbody > tr").on(h,"tbody > tr",function(a){var c=i.children("table").children("tbody").children("tr"),d=c.index(this);b.$table.children("tbody").children("tr").eq(d).add(this).toggleClass(e.scroller_rowHighlight,"mouseover"===a.type)}))},adjustWidth:function(a,b,e,f,g){var h=b.scroller_$container;h.children("."+d.scrollerTable).css(g?"right":"left",e),h.children("."+d.scrollerHeader+", ."+d.scrollerFooter).css(g?"right":"left",e+(g&&c.scroller.isSafari?f:0))},updateFixed:function(b,e){var f,g,h=e.scroller_$container,i=e.scroller_$header,j=e.scroller_$footer,k=b.$table,l=k.parent(),m=e.scroller_barSetWidth,n=k.hasClass(d.scrollerRtl);if(0===e.scroller_fixedColumns)return e.scroller_isBusy=!1,c.scroller.removeFixed(b,e),f=h.width(),l.width(f),g=c.scroller.hasScrollBar(l)?m:0,void i.parent().add(j.parent()).width(f-g);if(b.isScrolling){e.scroller_isBusy=!0,h.find("."+d.scrollerFixed).length||c.scroller.setupFixed(b,e);var o,p,q,r,s,t,u,v=e.scroller_$container.children("."+d.scrollerTable).children("table").children("tbody"),w=e.scroller_$header.children("thead").children("."+d.headerRow),x=e.scroller_$fixedColumns.addClass(d.scrollerHideElement),y=x.find("."+d.scrollerTable).children("table"),z=y.children("tbody"),A=c.scroller,B=e.scroller_fixedColumns,C=k.find("tbody td"),D=parseInt(C.css("border-right-width"),10)||1,E=parseInt((C.css("border-spacing")||"").split(/\s/)[0],10)/2||0,F=parseInt(k.css("padding-left"),10)+parseInt(k.css("padding-right"),10)-D,G=e.scroller_calcWidths;for(c.scroller.removeFixed(b,e,!1),o=0;o').css("height",g+"px"),x.find("."+d.scrollerTable).append(C)):f||x.find("."+d.scrollerBarSpacer).remove(),c.scroller.updateRowHeight(b,e),x.height(h.height()),x.removeClass(d.scrollerHideElement),x.find("caption").height(e.scroller_$header.find("caption").height()),e.scroller_isBusy=!1}},fixHeight:function(a,b){var c,e,f,g,h,i=d.scrollerAddedHeight,j=a.length;for(c=0;cf?h.addClass(i).height(e):e div { pointer-events: all; }."+d.scrollerWrap+" ."+d.scrollerFixed+" { position: absolute; top: 0; z-index: 1; left: 0 } ."+d.scrollerWrap+" ."+d.scrollerFixed+"."+d.scrollerRtl+" { left: auto; right: 0 } ."+d.scrollerWrap+"."+d.scrollerHasFix+" > ."+d.scrollerTable+" { overflow: auto; }."+d.scrollerFixed+" ."+d.scrollerFooter+" { position: absolute; bottom: 0; }."+d.scrollerFixed+" ."+d.scrollerTable+" { position: relative; left: 0; overflow: auto; -ms-overflow-style: none; }."+d.scrollerFixed+" ."+d.scrollerTable+"::-webkit-scrollbar { display: none; }."+d.scrollerWrap+" ."+d.scrollerFixedPanel+" { position: absolute; top: 0; bottom: 0; z-index: 2; left: 0; right: 0; } ";a("head").append(b)}),c.scroller={isFirefox:navigator.userAgent.toLowerCase().indexOf("firefox")>-1,isOldIE:document.all&&!b.atob,isIE:document.all&&!b.atob||navigator.appVersion.indexOf("Trident/")>0,isSafari:navigator.userAgent.toLowerCase().indexOf("safari")>-1&&navigator.userAgent.toLowerCase().indexOf("chrome")===-1,hasScrollBar:function(a,b){return b?a.get(0).scrollWidth>a.width():a.get(0).scrollHeight>a.height()},setWidth:function(a,b){a.css({width:b,"min-width":b,"max-width":b})},getBarWidth:function(){var b=a("
").css({position:"absolute",top:"-9999px",left:0,width:"100px",height:"100px",overflow:"scroll",visibility:"hidden"}).appendTo("body"),c=b[0],d=c.offsetWidth-c.clientWidth;return b.remove(),d},setup:function(e,f){var g,h,i,j,k,l,m,n,o,p=a(b),q=c.scroller,r=e.namespace+"tsscroller",s=a(),t=e.namespace.slice(1)+"tsscroller",u=e.$table;e.widthFixed=!0,f.scroller_calcWidths=[],f.scroller_saved=[0,0],f.scroller_isBusy=!0,null!==f.scroller_barWidth?f.scroller_barSetWidth=f.scroller_barWidth:(o=q.getBarWidth(),f.scroller_barSetWidth=null!==o?o:15),n=u.children("caption"),h=a(''+(n.length?n[0].outerHTML:"")+u.children("thead")[0].outerHTML+"
"),f.scroller_$header=h.addClass(e.namespace.slice(1)+"_extra_table"),i=u.children("tfoot"),i.length&&(s=a('
').addClass(e.namespace.slice(1)+"_extra_table").append(i.clone(!0)).wrap('
'),k=s.children("tfoot").eq(0).children("tr").children()),f.scroller_$footer=s,u.wrap('
').before(h).find("."+d.filterRow).addClass(d.filterRowHide),f.scroller_$container=u.parent(),s.length&&u.after(s.parent()),j=h.wrap('
').find("."+d.header),u.wrap('
':'">')),l=u.parent(),c.bindEvents(e.table,j),u.hasClass("hasFilters")&&c.filter.bindSearch(u,h.find("."+d.filter)),u.children("thead, caption").addClass(d.scrollerHideElement),g=l.parent().height(),l.off("scroll"+r).on("scroll"+r,function(){if(f.scroller_jumpToHeader){var b=p.scrollTop()-h.offset().top;0!==a(this).scrollTop()&&b0&&p.scrollTop(h.offset().top)}h.parent().add(s.parent()).scrollLeft(a(this).scrollLeft())}),m=((c.hasWidget(e.table,"filter")?"filterEnd":"tablesorter-initialized updateComplete")+" sortEnd pagerComplete columnUpdate ").split(" ").join(r+" "),u.off(r).on("sortEnd filterEnd".split(" ").join(r+" "),function(a){"sortEnd"===a.type&&f.scroller_upAfterSort?l.animate({scrollTop:0},"fast"):f.scroller_fixedColumns&&setTimeout(function(){l.scrollTop(f.scroller_saved[1]).scrollLeft(f.scroller_saved[0]),q.updateFixed(e,f)},0)}).on("setFixedColumnSize"+r,function(a,b){var c=f.scroller_$container;"undefined"==typeof b||isNaN(b)||(f.scroller_fixedColumns=parseInt(b,10)),q.removeFixed(e,f),b=f.scroller_fixedColumns,b>0&&b0&&q.updateFixed(e,f),q.resize(e,f))}),p.off("resize resizeEnd ".split(" ").join(r+" ")).on("resize"+r,c.window_resize).on("resizeEnd"+r,function(){p.off("resize"+r,c.window_resize),q.resize(e,f),p.on("resize"+r,c.window_resize),l.trigger("scroll"+r)}),e.isScrolling=!0,q.updateFixed(e,f),e.table.hasInitialized&&e.isScrolling&&setTimeout(function(){c.scroller.resize(e,f)},50)},resize:function(e,f){if(!f.scroller_isBusy){var g,h,i,j,k,l,m=c.scroller,n=f.scroller_$container,o=e.$table,p=o.parent(),q=f.scroller_$header,r=f.scroller_$footer,s=a(b),t=[s.scrollLeft(),s.scrollTop()],u=e.namespace.slice(1)+"tsscroller",v=a("div."+d.scrollerWrap+'[id!="'+u+'"]').addClass(d.scrollerHideElement),w='';for(f.scroller_calcWidths=[],m.removeFixed(e,f),n.find("."+d.scrollerSpacerRow).remove(),n.find("."+c.css.colgroup).remove(),o.find("."+d.scrollerHideElement).removeClass(d.scrollerHideElement),h=parseInt(o.css("border-left-width"),10),j=e.$headerIndexed,g=0;g',f.scroller_calcWidths[g]=i;w+="",e.$tbodies.eq(0).prepend(w),q.children("thead").append(w),r.children("tfoot").append(w),c.fixColumnWidth(e.table),w=e.$table.children("colgroup")[0].outerHTML,q.prepend(w),r.prepend(w),l=p.parent().innerWidth()-(m.hasScrollBar(p)?f.scroller_barSetWidth:0),p.width(l),l=(m.hasScrollBar(p)?f.scroller_barSetWidth:0)+h,i=p.innerWidth()-l,q.parent().add(r.parent()).width(i),p.width(i+l),o.children("thead, caption").addClass(d.scrollerHideElement),m.updateFixed(e,f),v.removeClass(d.scrollerHideElement),p.scrollTop(f.scroller_saved[1]),f.scroller_$container.find("."+d.scrollerFixed).find("."+d.scrollerTable).scrollTop(f.scroller_saved[1]),s.scrollLeft(t[0]),s.scrollTop(t[1]),setTimeout(function(){e.$table.triggerHandler("resizableUpdate"),e.$table.triggerHandler("scrollerComplete")},100)}},setupFixed:function(a,b){var e,f,g,h,i,j,k,l=a.$table,m=b.scroller_$container,n=b.scroller_fixedColumns;for(j=m.addClass(d.scrollerHasFix).clone().addClass(d.scrollerFixed).removeClass(d.scrollerWrap).attr("id",""),j.find("caption").html(" "),b.scroller_addFixedOverlay&&j.append('
'),k=j.find("."+d.scrollerTable),k.children("table").addClass(a.namespace.slice(1)+"_extra_table").attr("id","").children("thead, tfoot").remove(),b.scroller_$fixedColumns=j,l.hasClass(d.scrollerRtl)&&j.addClass(d.scrollerRtl),g=j.find("tr"),h=g.length,e=0;e')},throttle:function(a,b,c){b=b||50;var d,e;return function(){var f=c||this,g=+new Date,h=arguments;d&&g tr").on(h,"tbody > tr",function(a){var c=b.$table.children("tbody").children("tr").index(this);i.children("table").children("tbody").children("tr").eq(c).add(this).toggleClass(e.scroller_rowHighlight,"mouseover"===a.type)}),i.find("table").off(h,"tbody > tr").on(h,"tbody > tr",function(a){var c=i.children("table").children("tbody").children("tr"),d=c.index(this);b.$table.children("tbody").children("tr").eq(d).add(this).toggleClass(e.scroller_rowHighlight,"mouseover"===a.type)}))},adjustWidth:function(a,b,e,f,g){var h=b.scroller_$container;h.children("."+d.scrollerTable).css(g?"right":"left",e),h.children("."+d.scrollerHeader+", ."+d.scrollerFooter).css(g?"right":"left",e+(g&&c.scroller.isSafari?f:0))},updateFixed:function(b,e){var f,g,h=e.scroller_$container,i=e.scroller_$header,j=e.scroller_$footer,k=b.$table,l=k.parent(),m=e.scroller_barSetWidth,n=k.hasClass(d.scrollerRtl);if(0===e.scroller_fixedColumns)return e.scroller_isBusy=!1,c.scroller.removeFixed(b,e),f=h.width(),l.width(f),g=c.scroller.hasScrollBar(l)?m:0,void i.parent().add(j.parent()).width(f-g);if(b.isScrolling){e.scroller_isBusy=!0,h.find("."+d.scrollerFixed).length||c.scroller.setupFixed(b,e);var o,p,q,r,s,t,u,v=e.scroller_$container.children("."+d.scrollerTable).children("table").children("tbody"),w=e.scroller_$header.children("thead").children("."+d.headerRow),x=e.scroller_$fixedColumns.addClass(d.scrollerHideElement),y=x.find("."+d.scrollerTable).children("table"),z=y.children("tbody"),A=c.scroller,B=e.scroller_fixedColumns,C=k.find("tbody td"),D=parseInt(C.css("border-right-width"),10)||1,E=parseInt((C.css("border-spacing")||"").split(/\s/)[0],10)/2||0,F=parseInt(k.css("padding-left"),10)+parseInt(k.css("padding-right"),10)-D,G=e.scroller_calcWidths;for(c.scroller.removeFixed(b,e,!1),o=0;o').css("height",g+"px"),x.find("."+d.scrollerTable).append(C)):f||x.find("."+d.scrollerBarSpacer).remove(),c.scroller.updateRowHeight(b,e),x.height(h.height()),x.removeClass(d.scrollerHideElement),x.find("caption").height(e.scroller_$header.find("caption").height()),e.scroller_isBusy=!1}},fixHeight:function(a,b){var c,e,f,g,h,i=d.scrollerAddedHeight,j=a.length;for(c=0;cf?h.addClass(i).height(e):eNotes
    +
  • In v2.28.5 a scrollerComplete event is now triggered on the table once the scroller has completed rendering.
  • In v2.22.2,
    • Add support for multiple tbodies in fixed columns: @@ -249,24 +250,24 @@ $(function() {
    • Thanks to TheSin- for all the work he put into updating this widget... he really didn't like that scrollbar under the fixed column LOL.
  • -
  • In v2.22.0, -
      -
    • Horizontal scrollbar now only appears on overflow.
    • -
    • border-box is now applied to all tables with scroller widget applied.
    • -
    • Fixed columns no longer have pointer events disabled.
    • -
    • Fixed column vertical scrollbar is now hidden in IE9 & older.
    • -
    • Fixed tabbing through fixed column header cells & inputs.
    • -
    • The "setFixedColumnSize" can now be called with no set size to refresh the fixed column.
    • -
    • Add scroller_addFixedOverlay option which when true, adds an overlay on the fixed columns for styling.
    • -
    • Refresh column sizes after update.
    • -
    -

Older Notes

    +
  • In v2.22.0, +
      +
    • Horizontal scrollbar now only appears on overflow.
    • +
    • border-box is now applied to all tables with scroller widget applied.
    • +
    • Fixed columns no longer have pointer events disabled.
    • +
    • Fixed column vertical scrollbar is now hidden in IE9 & older.
    • +
    • Fixed tabbing through fixed column header cells & inputs.
    • +
    • The "setFixedColumnSize" can now be called with no set size to refresh the fixed column.
    • +
    • Add scroller_addFixedOverlay option which when true, adds an overlay on the fixed columns for styling.
    • +
    • Refresh column sizes after update.
    • +
    +
  • In v2.21.3
    • * NOTE * Prior to v2.21.3, this widget would work with jQuery v1.4.4+, now it requires jQuery v1.7+.
    • @@ -354,11 +355,9 @@ $(function() { true - + When true, the scroller automatically scrolls the inner window back to the top after sorting.

      - When true, the scroller automatically scrolls the inner window back to the top after sorting.
      -
      Set this option to false to prevent this behaviour, or to stop the window from scrolling after interacting with a table cell (e.g. clicking on a checkbox); new in v2.17.3
      @@ -369,7 +368,7 @@ $(function() { true Bring the header into view while scrolling.
      -

      When true, this option makes the table header jump into view when the table body is not scolled to the top and while scrolling up the page. It's not perfect, but it works. Disable it as desired.

      +

      When true, this option makes the table header jump into view when the table body is not scrolled to the top and while scrolling up the page. It's not perfect, but it works. Disable it as desired.

      * To see the difference, toggle the button in the demo below, then scroll down & up the page using a mouse wheel with the cursor at the horizontal center of the page and about 100 pixels from the top, so the cursor is within the table body.

      @@ -480,6 +479,17 @@ $(function() {
+

Events

+
+

scrollerComplete

+
+ A scrollerComplete event (added v2.28.5) is triggered on the table after the scroller widget has completed updating (including frozen columns). This event is triggered after an updateComplete event as the widget binds to that event to update the table. +
$( 'table' ).on( 'scrollerComplete', function() {
+  // do something
+} );
+
+
+

RTL Support

Two things are required to get the fixed column properly aligned on the right side: diff --git a/js/widgets/widget-scroller.js b/js/widgets/widget-scroller.js index d796fd70..b2c56f39 100644 --- a/js/widgets/widget-scroller.js +++ b/js/widgets/widget-scroller.js @@ -469,6 +469,7 @@ // update resizable widget handles setTimeout( function() { c.$table.triggerHandler( 'resizableUpdate' ); + c.$table.triggerHandler( 'scrollerComplete' ); }, 100 ); },