What would be the advice on starting and organising a library of useful code based on the jquery library?
Im thinking of starting this for all of the code that I use alot and ends up just being copied and pasted between projects.
I would like to have all of this functionality included in some sort of library of plugins?
Any ideas or best practices in this area?
EDIT:
A lot of advice here is with regards to creating plugins – thats proving to be helpful. Although, what i was really interested in is how to organise all of the plugins in one placce where i can simply call any piece of functionality whenever its required.
If your library functions are completely dependent on jQuery (using either the
$.fn.myFunc, for utility functions, or the$.myFuncstyle), then just implement your plugins as jQuery plugins. However, if you are just looking for a jQuery-like$.fn.myFuncframework, in which you only have utility functions, then just create your own namespace for your library functions like this:And then use your functions like this: