I know Jquery is just a library of javascript.
is Jquery animation and events slower then javascript? If so, how much slower.
i am trying to decide if i should rewrite my site in native javascript.
I know Jquery is just a library of javascript.
is Jquery animation and events slower then javascript? If so, how much slower.
i am trying to decide if i should rewrite my site in native javascript.
jQuery in terms of speed is quite fast for modern browsers on modern computers. So is pure JavaScript. Both run drastically slower on older browsers and machines.
Pure Javascript to access the DOM can be faster as you can cut the overhead that jQuery has on this. However it doesn't always have to be faster as you could write some major mistakes that slow things down again. jQuery on the other hand has been battle tested over the past few years and is proven to be performant.
Another thing is, jQuery wasn't specifically designed with mobile devices in mind. Events like click
cause a delay due to this fact (~300ms). jQuerys animations are also quite slow on the average mobile device because the way they are written makes them CPU bound, an average mobile device doesn't have alot of CPU power. A way around this is by using hardware accelerated CSS animations.