i'm using angular js ng-table display information. make header of ng-table fixed scroll bar.moreover need place 1 accordion before ng-table.
when collapse accordion ng-table fixed header not work properly. please refer plunker have created : "http://plnkr.co/edit/fgju46ccmuhidyacffhl?p=preview"
problem existing code stickytableheaders() calculations fixed header not getting updated on accordion expand collapse.
only way fix issue disable accordion animation , apply stickytableheaders() function in callbacks jquery ui accordion below :
$( "#accordion" ).accordion({ collapsible: true, animate :false, activate: function( event, ui ) { $('.table').stickytableheaders({ scrollablearea: container, "fixedoffset": 2 }); }, beforeactivate: function( event, ui ) { $('.table').stickytableheaders({ scrollablearea: container, "fixedoffset": 2 }) } }); you need disable animation because there no callback provided animate event.
Comments
Post a Comment