[jQuery] Understanding JQuery/Javascript.
Hi guys, I need some help with understanding JQuery/Javacript.
I am far away form being a Javascript guru so I am not sure I
understand why something done this (or other) way.
I am looking at tablesorterPager plug-in and it's written following
way
(function($) {
$.extend({
tablesorterPager: new function() {
.......blablabla......
}
});
// extend plugin scope
$.fn.extend({
tablesorterPager: $.tablesorterPager.construct
});
})(jQuery);
If I were to write this plug in I would do it like this
(function($)
{
$.fn.tablesorterPager = function()
{
.....blabblabla....
}
})(jQuery);
Questions:
Any advantages of writing it the way it's written?
Basically what is this $.extend({....}) for....? What does it achive.
Thanks
George.