Submodules are great for linking together several repo into a fixed set of configuration (ie a collection of SHA1 representing a fixed set of each of those submodules, as recorded by their parent repo)
However, they are always cloned in their own directory.
And they have a lot of other gocha's too (see "Why your company shouldn’t use Git submodules").
One way to go around that is to maintain 2 different sets of working tree:
One not versioned, with all the files together.
One with the repos cloned normally (ie with the submodules in their own directory).
You could do in it all the normal operation but with:
--git-tree option for each git commands, --git-tree pointing to the first set (the one with all the file in it)
- a complete enough
.gitignore able to ignore any file which isn't part of their particular repo.
That is not very satisfactory, and point out that submodules (even in other VCS which offer them -- Hg and subrepos, ClearCase and UCM component, ...) are supposed to be kept separate.
So sharing a JQuery plugin might first involve a bit of re-thinking the file organization to see if those files can indeed be considered as a "submodule".