我正在学习 Jquery,并且正在尝试了解如何制作插件。
$.fn.myfun = function(options) {
if (typeof options === 'string') {
callOption.apply(this, arguments);
} else {
initElements.call(this, options);
}
return this;
};
我不明白为什么有一个声明return this?我们为什么要退货?