备忘用的:
(function ($) { ???$.extend($.fn, { ???????clearError : function () { ???????????if (this.parent("span").length > 0) { ???????????????this.removeClass("validError").parent("span").find("label.error").remove(); ???????????} else { ???????????????this.removeClass("validError").parent("div").find("label.error").remove(); ???????????} ???????????return this; ???????} ???});})(jQuery);
其实里面东西挺多, 立即执行函数, 对象表示法等等;
扩展jQuery的方法
原文地址:http://www.cnblogs.com/voctrals/p/7435250.html