Suppose I am only using a few of the jQuery functions say show, hide, animate and attr. Is it possible to obtain only the part of jQuery library which implements these four functions?
I don’t mind using a tool such as a compiler or some dependency checking script.
P.S: Please do not tell me that the size of the jQuery library is very small and it won’t matter including it. I know this but still I want to know if it is possible.
Edit: I am asking for an automated solution.
Yes it would be possible, but non trivially painful. You’d need not only those 4 functions, but all the core functions (selectors, utility functions, etc) that those depend on. The current jquery core library and infrastructure does not provide any convenient method to do that dependency analysis: you might be able to find a javascript dependency analyzer that would let you do that smoothly, but by hand? Not pleasant.