(function ($) {
$.fn.test = function() {
console.log('works');
};
})(jQuery);
$(document).ready(function() {
var var1 = $().test(); // works
var var1 = $.test(); // error: $.test is not a function
});
Có thể gọi như thế này $.test()
?