From ae18b734523516fa84cc12e2d8913fb4ac4e12ff Mon Sep 17 00:00:00 2001 From: johnnyreilly Date: Tue, 24 Dec 2013 10:59:23 +0000 Subject: [PATCH] jQuery: Added addClass JSDoc --- jquery/jquery.d.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index e8a050194b..31b9b782fd 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -657,9 +657,9 @@ interface JQueryStatic { easing: JQueryEasing; } -/* - The jQuery instance members -*/ +/** + * The jQuery instance members + */ interface JQuery { // AJAX ajaxComplete(handler: any): JQuery; @@ -674,9 +674,18 @@ interface JQuery { serialize(): string; serializeArray(): any[]; - // Attributes - addClass(classNames: string): JQuery; - addClass(func: (index: any, currentClass: any) => string): JQuery; + /** + * Adds the specified class(es) to each of the set of matched elements. + * + * @param className One or more space-separated classes to be added to the class attribute of each matched element. + */ + addClass(className: string): JQuery; + /** + * Adds the specified class(es) to each of the set of matched elements. + * + * @param function A function returning one or more space-separated class names to be added to the existing class name(s). Receives the index position of the element in the set and the existing class name(s) as arguments. Within the function, this refers to the current element in the set. + */ + addClass(func: (index: number, currentClass: string) => string): JQuery; // http://api.jquery.com/addBack/ addBack(selector?: string): JQuery;