Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is jQuery a lightweight library?

jQuery is preferred a lot these days and one of the reasons or plus point is that it is said to be a very lightweight library. My question is what exactly makes it a lightweigt library? Is it the way the code is written OR is it the event handling mechanism OR has it something to do with the DOM?

Also to add, the performance of any web app which uses jQuery is much better compared to one with normal Javascript (e.g. smoother animation effects).

like image 606
copenndthagen Avatar asked Dec 17 '22 10:12

copenndthagen


1 Answers

The filesize is small when gzipped, and particular pains have been taken to ensure that it's as small as possible (avoiding use of eval when parsing JSON for instance).

It also concentrates on only having useful features, so it doesn't include things like a lightbox plugin or a way to create tabs, it just offers basic building blocks to build complex things.

like image 97
Rich Bradshaw Avatar answered Dec 21 '22 23:12

Rich Bradshaw