Hello everyone and welcome to my blog about programming and game development!
Here I post my experience and some useful info. My name is Alex, and I am a professional certified software developer from Estonia. So, why “Noob do AAA”?Well, that’s because I always wanted to create an AAA grade game, but did not have time and experience for it. Now I am a 40 years old person and I think this is the right time to try to make it.I have experience in programming, but game development is a new kind of activity for me, and I’ll try to describe my fist steps in this blog so that others can learn something.I plan to publish materials about programming, web development and game development, of course. So stay tuned. If you wish to support this blog, you can do it by PayPal donation. Have a nice day!
About this Website
FADEIN AND FADEOUT IN PURE JAVASCRIPT
Alex Gavrilov
January 22, 2024
Hello everyone! In this short article, I want to show you my implementation of fadeIn() and fadeOut() functionality from JQuery in pure JavaScript. JQuery was a great JavaScript wrapper with a lot of very useful functionality and it still in use, but as the time goes by it starts to become obsolete.
Today we have beautiful transitions and extended JavaScript functionality already built into modern web browsers, so we just don't need jQuery anymore. We can do the same with less JavaScript wrappers and better efficiency. For AJAX requests there are also better libraries such as Axios for example.
I use transitions and clone functionality to update DOM model with one additional custom Sleep function. Beware - if you use event binding, you will lose all your events in the target element. Here is my source code:
224
This site uses Cookies and Google Services. By continuing to browse the site you are agreeing to this.
Got it, thanks!