jquery を拡張する場合fn
($.fn.extend など)、プラグインを作成します。
(function($){
$.fn.extend({
functionName : function(){
//function returns
return this.each(function(){
$(this).append("<div>text</div>");
});
}
});
})(jQuery);
jQuery 名前空間を拡張したい場合は、次のように記述します。
(function($){
$.extend({
functionName : function(){
//function returns
}
});
})(jQuery);
私が知らないのは、この場合の「リターン」の書き方です