html - jquery table header clone issue -


i trying fix table header using jquery clone function. clone function works before scroll header not visible. after scroll cloned table works properly. need show table header before scroll , cloned table header after scroll

var tableoffset = $("#mytable").offset().top; var $header = $("#mytable > thead").clone(); var $fixedheader = $("#header-fixed").append($header); $(".table-container").bind("scroll", function () {     var offset = $(this).scrolltop();     if (offset >= tableoffset && $fixedheader.is(":hidden")) {         $fixedheader.fadein(2000);     } else if (offset < tableoffset) {         $fixedheader.hide();     } }); 


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -