Search code examples
jqueryloadfadeinfadeout

how to extract single function from jquery library?


I want to use only three methods from the jquery library without importing the whole library in my file, so is there any way to extract only fadeIn(), fadeOut(), load() from jquery?


Solution

  • You could look at the source code and try to remove anything not required for the fadeIn and fadeOut methods, but you would likely end up with most of the library.

    Overall jQuery is not designed to be taken ala cart, it is designed to be a single small footprint library. If it is not small enough for you needs, you might check out http://zeptojs.com.