I don't use jQuery anymore, but damn do I miss the simplicity of fadeIn() and fadeOut(). Trying to do the same with CSS transitions is much more complicated and brittle.
You can use the Web Animations API for this: https://developer.mozilla.org/en-US/docs/Web/API/Web_Animati...
Removing jQuery from GitHub.com front end
21–26 of 26 posts
Re: Removing jQuery from GitHub.com front end
#22> Set up metrics that tracked ratio of jQuery calls used per overall line of code and monitored that graph over time to make sure that it’s either staying constant or going down, not up. Would love to know how this was done.
As a guess, wrap each method in a function that records access and run original method? That way you can get stats for each method.
Re: Removing jQuery from GitHub.com front end
#23Previous discussion on same topic but different posted link: https://news.ycombinator.com/item?id=17612540
Re: Removing jQuery from GitHub.com front end
#24I love the detail-oriented approach to this. Tracking jQuery usage and slowly removing components from their custom jQuery library are both really clever strategies.
Re: Removing jQuery from GitHub.com front end
#25Re: Removing jQuery from GitHub.com front end
#26Earlier quoted context omitted.
You can use the Web Animations API for this: https://developer.mozilla.org/en-US/docs/Web/API/Web_Animati...
The Web Animations API is nice but it's a working draft that's only supported by FF and Chrome, no Safari or Edge.
According to caniuse, global native support is at 74%.