mkoryak / floatThead

Fixed <thead>. Doesn't need any custom css/html. Does what position:sticky can't
https://mkoryak.github.io/floatThead/
MIT License
1.22k stars 196 forks source link

floatThead without jQuery? #452

Closed elementalTIMING closed 4 years ago

elementalTIMING commented 4 years ago

I really love this module, but can you image to make a version without jQuery? This would be great to have especially e.g. for angular project where no jQuery is used.

Thx! Lars

mkoryak commented 4 years ago

Easier said than done. It's not like I just remove all uses of $. I actually did try to do this once. Look at my repo called 'fth2'. It's incomplete though. I don't remember how far I got.

The thing about not using jQuery is that it ends up adding significant overhead since you end up needing to write your own "closest()" etc. Now every lib you use needs to write their own util methods because there aren't any shared ones.

Take a look at that repo. If you can figure out how to use it, and open some issues, it may inspire me to continue that project... Or it may not.

mkoryak commented 4 years ago

I think a more viable option might be too build a custom version of jQuery without all the Ajax and promise junk. Only the stuff used in this lib and add it here as an optional import. The nice thing about this project is that it's very stable. I've fixed bugs for like 6 years.

elementalTIMING commented 4 years ago

I think a more viable option might be too build a custom version of jQuery without all the Ajax and promise junk. Only the stuff used in this lib and add it here as an optional import. The nice thing about this project is that it's very stable. I've fixed bugs for like 6 years.

I really can understand that it is not easy, but it would be a real real great help. I was also a former jQuery fan. But since frameworks like react or angular came up, I try too prevent using jQuery whenever possible (also due to its size). So I would really appreciate (and I guess many others too :-)) if you you could continue your custom version.

BTW: check out here small closest() w/o jQuery https://stackoverflow.com/questions/28406403/vanilla-javascript-closest-without-jquery

mkoryak commented 4 years ago

The real question is; what will happen first: Me finishing a native js version. Or Position:sticky support that is good enough to handle all this crap without this lib