You can get source from github http://docs.jquery.com/Downloading_jQuery#Git and modify buildfile (makefile or build.xml, depends on build system you will be using). For apache ant (build.xml) just remove files you don't need from list in the jquery target. Of course this will not handle internal jquery requirements for you, so resulting build can be broken.