$.fn.extend extends $.fn if you pass only one parameter.
It's useful if you're adding more methods (plugins)
but if you just want to add a single plugin it's the same as
$.fn.tablesorterPager = function(){ ... }
Accordingly $.extend extends $,
which is the same as $.tablesorterPager=function(){ .
It merges the new function into jQuery, meaning you can then apply all
of the library's methods to it. Try http://docs.jquery.com/Plugins/Authoring
if you haven't yet seen it.
I often write tiny add-ons in basic style, eg
function menutoggle ()
{
do stuff
};
But these only serve one purpose; they
2 matches
Mail list logo