Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to vanilla js #252

Open
wpsumo opened this issue Jul 27, 2020 · 12 comments
Open

Migrate to vanilla js #252

wpsumo opened this issue Jul 27, 2020 · 12 comments

Comments

@wpsumo
Copy link

wpsumo commented Jul 27, 2020

Move from jQuery dependencies to vanilla js:
https://wpspeedmatters.com/jquery-performance/

@wpsumo
Copy link
Author

wpsumo commented Nov 16, 2020

@jsor Any plans to migrate to vanilla js? 👍

@falko100
Copy link

falko100 commented Jan 6, 2021

@jsor +1 👍

@naton
Copy link

naton commented Feb 16, 2022

So, is anyone doing this? Should we just start? :)

(There is also the great https://youmightnotneedjquery.com/ btw)

@wpsumo
Copy link
Author

wpsumo commented Feb 16, 2022

@naton Don't think so go ahead and do it, I will be the first one to swap :)

@naton
Copy link

naton commented Feb 17, 2022

OK, here's a shot: https://github.com/naton/lity/tree/vanilla_js

As stated in the README, it's not without bugs so any help squashing them would be awesome. I think I solved all of the problems after all.

@naton
Copy link

naton commented Feb 18, 2022

@wpsumo Did you get a chance to try it out yet? I'm confident enough to merge it into my master now, and then do a PR here, if that's of interest.

@naton
Copy link

naton commented Mar 4, 2022

Anyway, I opened up a PR for this. Let me know if it should be based on another branch than master or if there's anything else I should do.

@wpsumo
Copy link
Author

wpsumo commented Mar 4, 2022

@wpsumo Did you get a chance to try it out yet? I'm confident enough to merge it into my master now, and then do a PR here, if that's of interest.

@naton Sorry missed your comment, no I just saw it haven't had a chance to test it out yet. Let me test it next week and get back to you. I will test it within wordpress with data-lity-target on the img tag. I will let you know how it goes within wordpress and defer and delay loading of javascript/s.

<img src="https://cdn.example.com/image.jpg" data-lity-target="https://cdn.example.com/image.jpg" alt="alt text" >

@n0ah01
Copy link

n0ah01 commented Apr 29, 2022

Just tested it with the code below, works perfectly, thanks a lot @naton !
<a href="https://youtube.com/watch?v=HFT7ATLQQx8" data-lity>Test Video</a>

@ojvribeiro
Copy link

@naton Since this project doesn't seem to be maintained anymore (last PR merged was Dec 22, 2020), can we all move to your fork?

@wpsumo
Copy link
Author

wpsumo commented Jan 24, 2023

@naton would make sense to do that based on @ojvribeiro comment above. Lets all move to your fork and continue using lity.

I've not tested it yet, sorry about that, it's about time to do it! I'll let you know :D

@naton
Copy link

naton commented Jan 24, 2023

Feel free to! I can't promise anything but since I use it myself I'll fix bugs as I find them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants