$(function () { alert('hello') $("#table-1").click(function () { $(this).find('th').toggleClass('open'); }); window.onscroll = function () { myFunction() }; var header = $(".my-thead").first(); var sticky = header.offset().top; function myFunction() { if (window.pageYOffset > sticky) { header.addClass("position-fixed").addClass('container').parent().css('margin-top', '130px'); } else { header.removeClass("position-fixed").removeClass('container').parent().css('margin-top', '0'); } } });
error: Content is protected !!