Here, jquery is mentioned under framework category:
A library. According to the homepage, and which I agree with.
A framework is something that usually forces a certain way of implementing a solution, whereas jQuery is just a tool to make implementing what you want to do easier.
It is a collection of software libraries providing a defined
application programming interface.
And jQuery is just a single library. After that it says:
Frameworks contain key distinguishing features that separate them from normal libraries:
- inversion of control – In a framework, unlike in libraries or normal user applications, the overall program’s flow of control is not dictated by the caller, but by the framework.
So, I think it’s not a framework.
According to the angularjs web site
- a library – a collection of functions which are useful when writing web apps. Your code is in charge and it calls into the library when
it sees fit. E.g., jQuery.
- frameworks – a particular implementation of a web application, where your code fills in the details. The framework is in charge
and it calls into your code when it needs something app specific.
E.g., durandal, ember, etc.
Framework and libarry are not necessarily mutually exclusive terms. Framework is typically a libarry or a collection of libraries.
I agree with all the answers here that jQuery itself is indeed a library, not a framework. As specified by Saeed’s answer, one of the key distinguishing features is inversion of control. You could however use jQuery’s functionality to create a framework of your own.
There are also other libraries built on top of jQuery, like jQuery UI
Some of it seems like semantics when defining what a library is vs a framework, but those examples help draw the line for me.