jquery插件中为什么要return return this.each(function() { this.id || (this.id = "ui-id-" + ++n) });

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/09 07:04:53
jquery插件中为什么要return return this.each(function() { this.id || (this.id =

jquery插件中为什么要return return this.each(function() { this.id || (this.id = "ui-id-" + ++n) });
jquery插件中为什么要return return this.each(function() { this.id || (this.id = "ui-id-" + ++n) });

jquery插件中为什么要return return this.each(function() { this.id || (this.id = "ui-id-" + ++n) });
为了保证链式操作,返回jquery对象,后边才可以继续使用该对象进行操作