jQuery extension is divided into object extension and jQuery itself class extension:
Object extension:
(function($){ $.fn.abc = function(){ console.log($(this).get(0)); } })(jQuery);
Instructions:
$(function(){ $(".otherdiv").abc(); });
jQuery itself class extension:
(function($){ $.extend({ showMsg:function(){ alert('some msg'); } }); })(jQuery);
Instructions:
$(function(){ $.showMsg(); });