Skip to content

Instantly share code, notes, and snippets.

@jtmueller
Created January 24, 2017 21:11
Show Gist options
  • Save jtmueller/993d801b945d9eef45fe2ee65d14b3f0 to your computer and use it in GitHub Desktop.
Save jtmueller/993d801b945d9eef45fe2ee65d14b3f0 to your computer and use it in GitHub Desktop.
// Allows for strongly-typed access to underlying DOM elements when working with jQuery objects containing only a single element type.
interface JQueryOf<T extends HTMLElement> extends JQuery {
get(index: number): T;
get(): T[];
[index: number]: T;
eq(index: number): JQueryOf<T>;
first(): JQueryOf<T>;
last(): JQueryOf<T>;
slice(start: number, end?: number): JQueryOf<T>;
each(func: (index: number, elem: T) => void | boolean): JQueryOf<T>;
}
interface JQuery {
find(selector: "a"): JQueryOf<HTMLAnchorElement>;
find(selector: "applet"): JQueryOf<HTMLAppletElement>;
find(selector: "area"): JQueryOf<HTMLAreaElement>;
find(selector: "audio"): JQueryOf<HTMLAudioElement>;
find(selector: "base"): JQueryOf<HTMLBaseElement>;
find(selector: "basefont"): JQueryOf<HTMLBaseFontElement>;
find(selector: "blockquote"): JQueryOf<HTMLQuoteElement>;
find(selector: "body"): JQueryOf<HTMLBodyElement>;
find(selector: "br"): JQueryOf<HTMLBRElement>;
find(selector: "button"): JQueryOf<HTMLButtonElement>;
find(selector: "canvas"): JQueryOf<HTMLCanvasElement>;
find(selector: "caption"): JQueryOf<HTMLTableCaptionElement>;
find(selector: "col"): JQueryOf<HTMLTableColElement>;
find(selector: "colgroup"): JQueryOf<HTMLTableColElement>;
find(selector: "datalist"): JQueryOf<HTMLDataListElement>;
find(selector: "del"): JQueryOf<HTMLModElement>;
find(selector: "dir"): JQueryOf<HTMLDirectoryElement>;
find(selector: "div"): JQueryOf<HTMLDivElement>;
find(selector: "dl"): JQueryOf<HTMLDListElement>;
find(selector: "embed"): JQueryOf<HTMLEmbedElement>;
find(selector: "fieldset"): JQueryOf<HTMLFieldSetElement>;
find(selector: "font"): JQueryOf<HTMLFontElement>;
find(selector: "form"): JQueryOf<HTMLFormElement>;
find(selector: "frame"): JQueryOf<HTMLFrameElement>;
find(selector: "frameset"): JQueryOf<HTMLFrameSetElement>;
find(selector: "h1"): JQueryOf<HTMLHeadingElement>;
find(selector: "h2"): JQueryOf<HTMLHeadingElement>;
find(selector: "h3"): JQueryOf<HTMLHeadingElement>;
find(selector: "h4"): JQueryOf<HTMLHeadingElement>;
find(selector: "h5"): JQueryOf<HTMLHeadingElement>;
find(selector: "h6"): JQueryOf<HTMLHeadingElement>;
find(selector: "head"): JQueryOf<HTMLHeadElement>;
find(selector: "hr"): JQueryOf<HTMLHRElement>;
find(selector: "html"): JQueryOf<HTMLHtmlElement>;
find(selector: "iframe"): JQueryOf<HTMLIFrameElement>;
find(selector: "img"): JQueryOf<HTMLImageElement>;
find(selector: "input"): JQueryOf<HTMLInputElement>;
find(selector: "ins"): JQueryOf<HTMLModElement>;
find(selector: "label"): JQueryOf<HTMLLabelElement>;
find(selector: "legend"): JQueryOf<HTMLLegendElement>;
find(selector: "li"): JQueryOf<HTMLLIElement>;
find(selector: "link"): JQueryOf<HTMLLinkElement>;
find(selector: "listing"): JQueryOf<HTMLPreElement>;
find(selector: "map"): JQueryOf<HTMLMapElement>;
find(selector: "marquee"): JQueryOf<HTMLMarqueeElement>;
find(selector: "menu"): JQueryOf<HTMLMenuElement>;
find(selector: "meta"): JQueryOf<HTMLMetaElement>;
find(selector: "meter"): JQueryOf<HTMLMeterElement>;
find(selector: "object"): JQueryOf<HTMLObjectElement>;
find(selector: "ol"): JQueryOf<HTMLOListElement>;
find(selector: "optgroup"): JQueryOf<HTMLOptGroupElement>;
find(selector: "option"): JQueryOf<HTMLOptionElement>;
find(selector: "p"): JQueryOf<HTMLParagraphElement>;
find(selector: "param"): JQueryOf<HTMLParamElement>;
find(selector: "picture"): JQueryOf<HTMLPictureElement>;
find(selector: "pre"): JQueryOf<HTMLPreElement>;
find(selector: "progress"): JQueryOf<HTMLProgressElement>;
find(selector: "q"): JQueryOf<HTMLQuoteElement>;
find(selector: "script"): JQueryOf<HTMLScriptElement>;
find(selector: "select"): JQueryOf<HTMLSelectElement>;
find(selector: "source"): JQueryOf<HTMLSourceElement>;
find(selector: "span"): JQueryOf<HTMLSpanElement>;
find(selector: "style"): JQueryOf<HTMLStyleElement>;
find(selector: "table"): JQueryOf<HTMLTableElement>;
find(selector: "tbody"): JQueryOf<HTMLTableSectionElement>;
find(selector: "td"): JQueryOf<HTMLTableDataCellElement>;
find(selector: "template"): JQueryOf<HTMLTemplateElement>;
find(selector: "textarea"): JQueryOf<HTMLTextAreaElement>;
find(selector: "tfoot"): JQueryOf<HTMLTableSectionElement>;
find(selector: "th"): JQueryOf<HTMLTableHeaderCellElement>;
find(selector: "thead"): JQueryOf<HTMLTableSectionElement>;
find(selector: "title"): JQueryOf<HTMLTitleElement>;
find(selector: "tr"): JQueryOf<HTMLTableRowElement>;
find(selector: "track"): JQueryOf<HTMLTrackElement>;
find(selector: "ul"): JQueryOf<HTMLUListElement>;
find(selector: "video"): JQueryOf<HTMLVideoElement>;
find(selector: "xmp"): JQueryOf<HTMLPreElement>;
closest(selector: "a"): JQueryOf<HTMLAnchorElement>;
closest(selector: "applet"): JQueryOf<HTMLAppletElement>;
closest(selector: "area"): JQueryOf<HTMLAreaElement>;
closest(selector: "audio"): JQueryOf<HTMLAudioElement>;
closest(selector: "base"): JQueryOf<HTMLBaseElement>;
closest(selector: "basefont"): JQueryOf<HTMLBaseFontElement>;
closest(selector: "blockquote"): JQueryOf<HTMLQuoteElement>;
closest(selector: "body"): JQueryOf<HTMLBodyElement>;
closest(selector: "br"): JQueryOf<HTMLBRElement>;
closest(selector: "button"): JQueryOf<HTMLButtonElement>;
closest(selector: "canvas"): JQueryOf<HTMLCanvasElement>;
closest(selector: "caption"): JQueryOf<HTMLTableCaptionElement>;
closest(selector: "col"): JQueryOf<HTMLTableColElement>;
closest(selector: "colgroup"): JQueryOf<HTMLTableColElement>;
closest(selector: "datalist"): JQueryOf<HTMLDataListElement>;
closest(selector: "del"): JQueryOf<HTMLModElement>;
closest(selector: "dir"): JQueryOf<HTMLDirectoryElement>;
closest(selector: "div"): JQueryOf<HTMLDivElement>;
closest(selector: "dl"): JQueryOf<HTMLDListElement>;
closest(selector: "embed"): JQueryOf<HTMLEmbedElement>;
closest(selector: "fieldset"): JQueryOf<HTMLFieldSetElement>;
closest(selector: "font"): JQueryOf<HTMLFontElement>;
closest(selector: "form"): JQueryOf<HTMLFormElement>;
closest(selector: "frame"): JQueryOf<HTMLFrameElement>;
closest(selector: "frameset"): JQueryOf<HTMLFrameSetElement>;
closest(selector: "h1"): JQueryOf<HTMLHeadingElement>;
closest(selector: "h2"): JQueryOf<HTMLHeadingElement>;
closest(selector: "h3"): JQueryOf<HTMLHeadingElement>;
closest(selector: "h4"): JQueryOf<HTMLHeadingElement>;
closest(selector: "h5"): JQueryOf<HTMLHeadingElement>;
closest(selector: "h6"): JQueryOf<HTMLHeadingElement>;
closest(selector: "head"): JQueryOf<HTMLHeadElement>;
closest(selector: "hr"): JQueryOf<HTMLHRElement>;
closest(selector: "html"): JQueryOf<HTMLHtmlElement>;
closest(selector: "iframe"): JQueryOf<HTMLIFrameElement>;
closest(selector: "img"): JQueryOf<HTMLImageElement>;
closest(selector: "input"): JQueryOf<HTMLInputElement>;
closest(selector: "ins"): JQueryOf<HTMLModElement>;
closest(selector: "label"): JQueryOf<HTMLLabelElement>;
closest(selector: "legend"): JQueryOf<HTMLLegendElement>;
closest(selector: "li"): JQueryOf<HTMLLIElement>;
closest(selector: "link"): JQueryOf<HTMLLinkElement>;
closest(selector: "listing"): JQueryOf<HTMLPreElement>;
closest(selector: "map"): JQueryOf<HTMLMapElement>;
closest(selector: "marquee"): JQueryOf<HTMLMarqueeElement>;
closest(selector: "menu"): JQueryOf<HTMLMenuElement>;
closest(selector: "meta"): JQueryOf<HTMLMetaElement>;
closest(selector: "meter"): JQueryOf<HTMLMeterElement>;
closest(selector: "object"): JQueryOf<HTMLObjectElement>;
closest(selector: "ol"): JQueryOf<HTMLOListElement>;
closest(selector: "optgroup"): JQueryOf<HTMLOptGroupElement>;
closest(selector: "option"): JQueryOf<HTMLOptionElement>;
closest(selector: "p"): JQueryOf<HTMLParagraphElement>;
closest(selector: "param"): JQueryOf<HTMLParamElement>;
closest(selector: "picture"): JQueryOf<HTMLPictureElement>;
closest(selector: "pre"): JQueryOf<HTMLPreElement>;
closest(selector: "progress"): JQueryOf<HTMLProgressElement>;
closest(selector: "q"): JQueryOf<HTMLQuoteElement>;
closest(selector: "script"): JQueryOf<HTMLScriptElement>;
closest(selector: "select"): JQueryOf<HTMLSelectElement>;
closest(selector: "source"): JQueryOf<HTMLSourceElement>;
closest(selector: "span"): JQueryOf<HTMLSpanElement>;
closest(selector: "style"): JQueryOf<HTMLStyleElement>;
closest(selector: "table"): JQueryOf<HTMLTableElement>;
closest(selector: "tbody"): JQueryOf<HTMLTableSectionElement>;
closest(selector: "td"): JQueryOf<HTMLTableDataCellElement>;
closest(selector: "template"): JQueryOf<HTMLTemplateElement>;
closest(selector: "textarea"): JQueryOf<HTMLTextAreaElement>;
closest(selector: "tfoot"): JQueryOf<HTMLTableSectionElement>;
closest(selector: "th"): JQueryOf<HTMLTableHeaderCellElement>;
closest(selector: "thead"): JQueryOf<HTMLTableSectionElement>;
closest(selector: "title"): JQueryOf<HTMLTitleElement>;
closest(selector: "tr"): JQueryOf<HTMLTableRowElement>;
closest(selector: "track"): JQueryOf<HTMLTrackElement>;
closest(selector: "ul"): JQueryOf<HTMLUListElement>;
closest(selector: "video"): JQueryOf<HTMLVideoElement>;
closest(selector: "xmp"): JQueryOf<HTMLPreElement>;
children(selector: "a"): JQueryOf<HTMLAnchorElement>;
children(selector: "applet"): JQueryOf<HTMLAppletElement>;
children(selector: "area"): JQueryOf<HTMLAreaElement>;
children(selector: "audio"): JQueryOf<HTMLAudioElement>;
children(selector: "base"): JQueryOf<HTMLBaseElement>;
children(selector: "basefont"): JQueryOf<HTMLBaseFontElement>;
children(selector: "blockquote"): JQueryOf<HTMLQuoteElement>;
children(selector: "body"): JQueryOf<HTMLBodyElement>;
children(selector: "br"): JQueryOf<HTMLBRElement>;
children(selector: "button"): JQueryOf<HTMLButtonElement>;
children(selector: "canvas"): JQueryOf<HTMLCanvasElement>;
children(selector: "caption"): JQueryOf<HTMLTableCaptionElement>;
children(selector: "col"): JQueryOf<HTMLTableColElement>;
children(selector: "colgroup"): JQueryOf<HTMLTableColElement>;
children(selector: "datalist"): JQueryOf<HTMLDataListElement>;
children(selector: "del"): JQueryOf<HTMLModElement>;
children(selector: "dir"): JQueryOf<HTMLDirectoryElement>;
children(selector: "div"): JQueryOf<HTMLDivElement>;
children(selector: "dl"): JQueryOf<HTMLDListElement>;
children(selector: "embed"): JQueryOf<HTMLEmbedElement>;
children(selector: "fieldset"): JQueryOf<HTMLFieldSetElement>;
children(selector: "font"): JQueryOf<HTMLFontElement>;
children(selector: "form"): JQueryOf<HTMLFormElement>;
children(selector: "frame"): JQueryOf<HTMLFrameElement>;
children(selector: "frameset"): JQueryOf<HTMLFrameSetElement>;
children(selector: "h1"): JQueryOf<HTMLHeadingElement>;
children(selector: "h2"): JQueryOf<HTMLHeadingElement>;
children(selector: "h3"): JQueryOf<HTMLHeadingElement>;
children(selector: "h4"): JQueryOf<HTMLHeadingElement>;
children(selector: "h5"): JQueryOf<HTMLHeadingElement>;
children(selector: "h6"): JQueryOf<HTMLHeadingElement>;
children(selector: "head"): JQueryOf<HTMLHeadElement>;
children(selector: "hr"): JQueryOf<HTMLHRElement>;
children(selector: "html"): JQueryOf<HTMLHtmlElement>;
children(selector: "iframe"): JQueryOf<HTMLIFrameElement>;
children(selector: "img"): JQueryOf<HTMLImageElement>;
children(selector: "input"): JQueryOf<HTMLInputElement>;
children(selector: "ins"): JQueryOf<HTMLModElement>;
children(selector: "label"): JQueryOf<HTMLLabelElement>;
children(selector: "legend"): JQueryOf<HTMLLegendElement>;
children(selector: "li"): JQueryOf<HTMLLIElement>;
children(selector: "link"): JQueryOf<HTMLLinkElement>;
children(selector: "listing"): JQueryOf<HTMLPreElement>;
children(selector: "map"): JQueryOf<HTMLMapElement>;
children(selector: "marquee"): JQueryOf<HTMLMarqueeElement>;
children(selector: "menu"): JQueryOf<HTMLMenuElement>;
children(selector: "meta"): JQueryOf<HTMLMetaElement>;
children(selector: "meter"): JQueryOf<HTMLMeterElement>;
children(selector: "object"): JQueryOf<HTMLObjectElement>;
children(selector: "ol"): JQueryOf<HTMLOListElement>;
children(selector: "optgroup"): JQueryOf<HTMLOptGroupElement>;
children(selector: "option"): JQueryOf<HTMLOptionElement>;
children(selector: "p"): JQueryOf<HTMLParagraphElement>;
children(selector: "param"): JQueryOf<HTMLParamElement>;
children(selector: "picture"): JQueryOf<HTMLPictureElement>;
children(selector: "pre"): JQueryOf<HTMLPreElement>;
children(selector: "progress"): JQueryOf<HTMLProgressElement>;
children(selector: "q"): JQueryOf<HTMLQuoteElement>;
children(selector: "script"): JQueryOf<HTMLScriptElement>;
children(selector: "select"): JQueryOf<HTMLSelectElement>;
children(selector: "source"): JQueryOf<HTMLSourceElement>;
children(selector: "span"): JQueryOf<HTMLSpanElement>;
children(selector: "style"): JQueryOf<HTMLStyleElement>;
children(selector: "table"): JQueryOf<HTMLTableElement>;
children(selector: "tbody"): JQueryOf<HTMLTableSectionElement>;
children(selector: "td"): JQueryOf<HTMLTableDataCellElement>;
children(selector: "template"): JQueryOf<HTMLTemplateElement>;
children(selector: "textarea"): JQueryOf<HTMLTextAreaElement>;
children(selector: "tfoot"): JQueryOf<HTMLTableSectionElement>;
children(selector: "th"): JQueryOf<HTMLTableHeaderCellElement>;
children(selector: "thead"): JQueryOf<HTMLTableSectionElement>;
children(selector: "title"): JQueryOf<HTMLTitleElement>;
children(selector: "tr"): JQueryOf<HTMLTableRowElement>;
children(selector: "track"): JQueryOf<HTMLTrackElement>;
children(selector: "ul"): JQueryOf<HTMLUListElement>;
children(selector: "video"): JQueryOf<HTMLVideoElement>;
children(selector: "xmp"): JQueryOf<HTMLPreElement>;
parent(selector: "a"): JQueryOf<HTMLAnchorElement>;
parent(selector: "applet"): JQueryOf<HTMLAppletElement>;
parent(selector: "area"): JQueryOf<HTMLAreaElement>;
parent(selector: "audio"): JQueryOf<HTMLAudioElement>;
parent(selector: "base"): JQueryOf<HTMLBaseElement>;
parent(selector: "basefont"): JQueryOf<HTMLBaseFontElement>;
parent(selector: "blockquote"): JQueryOf<HTMLQuoteElement>;
parent(selector: "body"): JQueryOf<HTMLBodyElement>;
parent(selector: "br"): JQueryOf<HTMLBRElement>;
parent(selector: "button"): JQueryOf<HTMLButtonElement>;
parent(selector: "canvas"): JQueryOf<HTMLCanvasElement>;
parent(selector: "caption"): JQueryOf<HTMLTableCaptionElement>;
parent(selector: "col"): JQueryOf<HTMLTableColElement>;
parent(selector: "colgroup"): JQueryOf<HTMLTableColElement>;
parent(selector: "datalist"): JQueryOf<HTMLDataListElement>;
parent(selector: "del"): JQueryOf<HTMLModElement>;
parent(selector: "dir"): JQueryOf<HTMLDirectoryElement>;
parent(selector: "div"): JQueryOf<HTMLDivElement>;
parent(selector: "dl"): JQueryOf<HTMLDListElement>;
parent(selector: "embed"): JQueryOf<HTMLEmbedElement>;
parent(selector: "fieldset"): JQueryOf<HTMLFieldSetElement>;
parent(selector: "font"): JQueryOf<HTMLFontElement>;
parent(selector: "form"): JQueryOf<HTMLFormElement>;
parent(selector: "frame"): JQueryOf<HTMLFrameElement>;
parent(selector: "frameset"): JQueryOf<HTMLFrameSetElement>;
parent(selector: "h1"): JQueryOf<HTMLHeadingElement>;
parent(selector: "h2"): JQueryOf<HTMLHeadingElement>;
parent(selector: "h3"): JQueryOf<HTMLHeadingElement>;
parent(selector: "h4"): JQueryOf<HTMLHeadingElement>;
parent(selector: "h5"): JQueryOf<HTMLHeadingElement>;
parent(selector: "h6"): JQueryOf<HTMLHeadingElement>;
parent(selector: "head"): JQueryOf<HTMLHeadElement>;
parent(selector: "hr"): JQueryOf<HTMLHRElement>;
parent(selector: "html"): JQueryOf<HTMLHtmlElement>;
parent(selector: "iframe"): JQueryOf<HTMLIFrameElement>;
parent(selector: "img"): JQueryOf<HTMLImageElement>;
parent(selector: "input"): JQueryOf<HTMLInputElement>;
parent(selector: "ins"): JQueryOf<HTMLModElement>;
parent(selector: "label"): JQueryOf<HTMLLabelElement>;
parent(selector: "legend"): JQueryOf<HTMLLegendElement>;
parent(selector: "li"): JQueryOf<HTMLLIElement>;
parent(selector: "link"): JQueryOf<HTMLLinkElement>;
parent(selector: "listing"): JQueryOf<HTMLPreElement>;
parent(selector: "map"): JQueryOf<HTMLMapElement>;
parent(selector: "marquee"): JQueryOf<HTMLMarqueeElement>;
parent(selector: "menu"): JQueryOf<HTMLMenuElement>;
parent(selector: "meta"): JQueryOf<HTMLMetaElement>;
parent(selector: "meter"): JQueryOf<HTMLMeterElement>;
parent(selector: "object"): JQueryOf<HTMLObjectElement>;
parent(selector: "ol"): JQueryOf<HTMLOListElement>;
parent(selector: "optgroup"): JQueryOf<HTMLOptGroupElement>;
parent(selector: "option"): JQueryOf<HTMLOptionElement>;
parent(selector: "p"): JQueryOf<HTMLParagraphElement>;
parent(selector: "param"): JQueryOf<HTMLParamElement>;
parent(selector: "picture"): JQueryOf<HTMLPictureElement>;
parent(selector: "pre"): JQueryOf<HTMLPreElement>;
parent(selector: "progress"): JQueryOf<HTMLProgressElement>;
parent(selector: "q"): JQueryOf<HTMLQuoteElement>;
parent(selector: "script"): JQueryOf<HTMLScriptElement>;
parent(selector: "select"): JQueryOf<HTMLSelectElement>;
parent(selector: "source"): JQueryOf<HTMLSourceElement>;
parent(selector: "span"): JQueryOf<HTMLSpanElement>;
parent(selector: "style"): JQueryOf<HTMLStyleElement>;
parent(selector: "table"): JQueryOf<HTMLTableElement>;
parent(selector: "tbody"): JQueryOf<HTMLTableSectionElement>;
parent(selector: "td"): JQueryOf<HTMLTableDataCellElement>;
parent(selector: "template"): JQueryOf<HTMLTemplateElement>;
parent(selector: "textarea"): JQueryOf<HTMLTextAreaElement>;
parent(selector: "tfoot"): JQueryOf<HTMLTableSectionElement>;
parent(selector: "th"): JQueryOf<HTMLTableHeaderCellElement>;
parent(selector: "thead"): JQueryOf<HTMLTableSectionElement>;
parent(selector: "title"): JQueryOf<HTMLTitleElement>;
parent(selector: "tr"): JQueryOf<HTMLTableRowElement>;
parent(selector: "track"): JQueryOf<HTMLTrackElement>;
parent(selector: "ul"): JQueryOf<HTMLUListElement>;
parent(selector: "video"): JQueryOf<HTMLVideoElement>;
parent(selector: "xmp"): JQueryOf<HTMLPreElement>;
prev(selector: "a"): JQueryOf<HTMLAnchorElement>;
prev(selector: "applet"): JQueryOf<HTMLAppletElement>;
prev(selector: "area"): JQueryOf<HTMLAreaElement>;
prev(selector: "audio"): JQueryOf<HTMLAudioElement>;
prev(selector: "base"): JQueryOf<HTMLBaseElement>;
prev(selector: "basefont"): JQueryOf<HTMLBaseFontElement>;
prev(selector: "blockquote"): JQueryOf<HTMLQuoteElement>;
prev(selector: "body"): JQueryOf<HTMLBodyElement>;
prev(selector: "br"): JQueryOf<HTMLBRElement>;
prev(selector: "button"): JQueryOf<HTMLButtonElement>;
prev(selector: "canvas"): JQueryOf<HTMLCanvasElement>;
prev(selector: "caption"): JQueryOf<HTMLTableCaptionElement>;
prev(selector: "col"): JQueryOf<HTMLTableColElement>;
prev(selector: "colgroup"): JQueryOf<HTMLTableColElement>;
prev(selector: "datalist"): JQueryOf<HTMLDataListElement>;
prev(selector: "del"): JQueryOf<HTMLModElement>;
prev(selector: "dir"): JQueryOf<HTMLDirectoryElement>;
prev(selector: "div"): JQueryOf<HTMLDivElement>;
prev(selector: "dl"): JQueryOf<HTMLDListElement>;
prev(selector: "embed"): JQueryOf<HTMLEmbedElement>;
prev(selector: "fieldset"): JQueryOf<HTMLFieldSetElement>;
prev(selector: "font"): JQueryOf<HTMLFontElement>;
prev(selector: "form"): JQueryOf<HTMLFormElement>;
prev(selector: "frame"): JQueryOf<HTMLFrameElement>;
prev(selector: "frameset"): JQueryOf<HTMLFrameSetElement>;
prev(selector: "h1"): JQueryOf<HTMLHeadingElement>;
prev(selector: "h2"): JQueryOf<HTMLHeadingElement>;
prev(selector: "h3"): JQueryOf<HTMLHeadingElement>;
prev(selector: "h4"): JQueryOf<HTMLHeadingElement>;
prev(selector: "h5"): JQueryOf<HTMLHeadingElement>;
prev(selector: "h6"): JQueryOf<HTMLHeadingElement>;
prev(selector: "head"): JQueryOf<HTMLHeadElement>;
prev(selector: "hr"): JQueryOf<HTMLHRElement>;
prev(selector: "html"): JQueryOf<HTMLHtmlElement>;
prev(selector: "iframe"): JQueryOf<HTMLIFrameElement>;
prev(selector: "img"): JQueryOf<HTMLImageElement>;
prev(selector: "input"): JQueryOf<HTMLInputElement>;
prev(selector: "ins"): JQueryOf<HTMLModElement>;
prev(selector: "label"): JQueryOf<HTMLLabelElement>;
prev(selector: "legend"): JQueryOf<HTMLLegendElement>;
prev(selector: "li"): JQueryOf<HTMLLIElement>;
prev(selector: "link"): JQueryOf<HTMLLinkElement>;
prev(selector: "listing"): JQueryOf<HTMLPreElement>;
prev(selector: "map"): JQueryOf<HTMLMapElement>;
prev(selector: "marquee"): JQueryOf<HTMLMarqueeElement>;
prev(selector: "menu"): JQueryOf<HTMLMenuElement>;
prev(selector: "meta"): JQueryOf<HTMLMetaElement>;
prev(selector: "meter"): JQueryOf<HTMLMeterElement>;
prev(selector: "object"): JQueryOf<HTMLObjectElement>;
prev(selector: "ol"): JQueryOf<HTMLOListElement>;
prev(selector: "optgroup"): JQueryOf<HTMLOptGroupElement>;
prev(selector: "option"): JQueryOf<HTMLOptionElement>;
prev(selector: "p"): JQueryOf<HTMLParagraphElement>;
prev(selector: "param"): JQueryOf<HTMLParamElement>;
prev(selector: "picture"): JQueryOf<HTMLPictureElement>;
prev(selector: "pre"): JQueryOf<HTMLPreElement>;
prev(selector: "progress"): JQueryOf<HTMLProgressElement>;
prev(selector: "q"): JQueryOf<HTMLQuoteElement>;
prev(selector: "script"): JQueryOf<HTMLScriptElement>;
prev(selector: "select"): JQueryOf<HTMLSelectElement>;
prev(selector: "source"): JQueryOf<HTMLSourceElement>;
prev(selector: "span"): JQueryOf<HTMLSpanElement>;
prev(selector: "style"): JQueryOf<HTMLStyleElement>;
prev(selector: "table"): JQueryOf<HTMLTableElement>;
prev(selector: "tbody"): JQueryOf<HTMLTableSectionElement>;
prev(selector: "td"): JQueryOf<HTMLTableDataCellElement>;
prev(selector: "template"): JQueryOf<HTMLTemplateElement>;
prev(selector: "textarea"): JQueryOf<HTMLTextAreaElement>;
prev(selector: "tfoot"): JQueryOf<HTMLTableSectionElement>;
prev(selector: "th"): JQueryOf<HTMLTableHeaderCellElement>;
prev(selector: "thead"): JQueryOf<HTMLTableSectionElement>;
prev(selector: "title"): JQueryOf<HTMLTitleElement>;
prev(selector: "tr"): JQueryOf<HTMLTableRowElement>;
prev(selector: "track"): JQueryOf<HTMLTrackElement>;
prev(selector: "ul"): JQueryOf<HTMLUListElement>;
prev(selector: "video"): JQueryOf<HTMLVideoElement>;
prev(selector: "xmp"): JQueryOf<HTMLPreElement>;
next(selector: "a"): JQueryOf<HTMLAnchorElement>;
next(selector: "applet"): JQueryOf<HTMLAppletElement>;
next(selector: "area"): JQueryOf<HTMLAreaElement>;
next(selector: "audio"): JQueryOf<HTMLAudioElement>;
next(selector: "base"): JQueryOf<HTMLBaseElement>;
next(selector: "basefont"): JQueryOf<HTMLBaseFontElement>;
next(selector: "blockquote"): JQueryOf<HTMLQuoteElement>;
next(selector: "body"): JQueryOf<HTMLBodyElement>;
next(selector: "br"): JQueryOf<HTMLBRElement>;
next(selector: "button"): JQueryOf<HTMLButtonElement>;
next(selector: "canvas"): JQueryOf<HTMLCanvasElement>;
next(selector: "caption"): JQueryOf<HTMLTableCaptionElement>;
next(selector: "col"): JQueryOf<HTMLTableColElement>;
next(selector: "colgroup"): JQueryOf<HTMLTableColElement>;
next(selector: "datalist"): JQueryOf<HTMLDataListElement>;
next(selector: "del"): JQueryOf<HTMLModElement>;
next(selector: "dir"): JQueryOf<HTMLDirectoryElement>;
next(selector: "div"): JQueryOf<HTMLDivElement>;
next(selector: "dl"): JQueryOf<HTMLDListElement>;
next(selector: "embed"): JQueryOf<HTMLEmbedElement>;
next(selector: "fieldset"): JQueryOf<HTMLFieldSetElement>;
next(selector: "font"): JQueryOf<HTMLFontElement>;
next(selector: "form"): JQueryOf<HTMLFormElement>;
next(selector: "frame"): JQueryOf<HTMLFrameElement>;
next(selector: "frameset"): JQueryOf<HTMLFrameSetElement>;
next(selector: "h1"): JQueryOf<HTMLHeadingElement>;
next(selector: "h2"): JQueryOf<HTMLHeadingElement>;
next(selector: "h3"): JQueryOf<HTMLHeadingElement>;
next(selector: "h4"): JQueryOf<HTMLHeadingElement>;
next(selector: "h5"): JQueryOf<HTMLHeadingElement>;
next(selector: "h6"): JQueryOf<HTMLHeadingElement>;
next(selector: "head"): JQueryOf<HTMLHeadElement>;
next(selector: "hr"): JQueryOf<HTMLHRElement>;
next(selector: "html"): JQueryOf<HTMLHtmlElement>;
next(selector: "iframe"): JQueryOf<HTMLIFrameElement>;
next(selector: "img"): JQueryOf<HTMLImageElement>;
next(selector: "input"): JQueryOf<HTMLInputElement>;
next(selector: "ins"): JQueryOf<HTMLModElement>;
next(selector: "label"): JQueryOf<HTMLLabelElement>;
next(selector: "legend"): JQueryOf<HTMLLegendElement>;
next(selector: "li"): JQueryOf<HTMLLIElement>;
next(selector: "link"): JQueryOf<HTMLLinkElement>;
next(selector: "listing"): JQueryOf<HTMLPreElement>;
next(selector: "map"): JQueryOf<HTMLMapElement>;
next(selector: "marquee"): JQueryOf<HTMLMarqueeElement>;
next(selector: "menu"): JQueryOf<HTMLMenuElement>;
next(selector: "meta"): JQueryOf<HTMLMetaElement>;
next(selector: "meter"): JQueryOf<HTMLMeterElement>;
next(selector: "object"): JQueryOf<HTMLObjectElement>;
next(selector: "ol"): JQueryOf<HTMLOListElement>;
next(selector: "optgroup"): JQueryOf<HTMLOptGroupElement>;
next(selector: "option"): JQueryOf<HTMLOptionElement>;
next(selector: "p"): JQueryOf<HTMLParagraphElement>;
next(selector: "param"): JQueryOf<HTMLParamElement>;
next(selector: "picture"): JQueryOf<HTMLPictureElement>;
next(selector: "pre"): JQueryOf<HTMLPreElement>;
next(selector: "progress"): JQueryOf<HTMLProgressElement>;
next(selector: "q"): JQueryOf<HTMLQuoteElement>;
next(selector: "script"): JQueryOf<HTMLScriptElement>;
next(selector: "select"): JQueryOf<HTMLSelectElement>;
next(selector: "source"): JQueryOf<HTMLSourceElement>;
next(selector: "span"): JQueryOf<HTMLSpanElement>;
next(selector: "style"): JQueryOf<HTMLStyleElement>;
next(selector: "table"): JQueryOf<HTMLTableElement>;
next(selector: "tbody"): JQueryOf<HTMLTableSectionElement>;
next(selector: "td"): JQueryOf<HTMLTableDataCellElement>;
next(selector: "template"): JQueryOf<HTMLTemplateElement>;
next(selector: "textarea"): JQueryOf<HTMLTextAreaElement>;
next(selector: "tfoot"): JQueryOf<HTMLTableSectionElement>;
next(selector: "th"): JQueryOf<HTMLTableHeaderCellElement>;
next(selector: "thead"): JQueryOf<HTMLTableSectionElement>;
next(selector: "title"): JQueryOf<HTMLTitleElement>;
next(selector: "tr"): JQueryOf<HTMLTableRowElement>;
next(selector: "track"): JQueryOf<HTMLTrackElement>;
next(selector: "ul"): JQueryOf<HTMLUListElement>;
next(selector: "video"): JQueryOf<HTMLVideoElement>;
next(selector: "xmp"): JQueryOf<HTMLPreElement>;
siblings(selector: "a"): JQueryOf<HTMLAnchorElement>;
siblings(selector: "applet"): JQueryOf<HTMLAppletElement>;
siblings(selector: "area"): JQueryOf<HTMLAreaElement>;
siblings(selector: "audio"): JQueryOf<HTMLAudioElement>;
siblings(selector: "base"): JQueryOf<HTMLBaseElement>;
siblings(selector: "basefont"): JQueryOf<HTMLBaseFontElement>;
siblings(selector: "blockquote"): JQueryOf<HTMLQuoteElement>;
siblings(selector: "body"): JQueryOf<HTMLBodyElement>;
siblings(selector: "br"): JQueryOf<HTMLBRElement>;
siblings(selector: "button"): JQueryOf<HTMLButtonElement>;
siblings(selector: "canvas"): JQueryOf<HTMLCanvasElement>;
siblings(selector: "caption"): JQueryOf<HTMLTableCaptionElement>;
siblings(selector: "col"): JQueryOf<HTMLTableColElement>;
siblings(selector: "colgroup"): JQueryOf<HTMLTableColElement>;
siblings(selector: "datalist"): JQueryOf<HTMLDataListElement>;
siblings(selector: "del"): JQueryOf<HTMLModElement>;
siblings(selector: "dir"): JQueryOf<HTMLDirectoryElement>;
siblings(selector: "div"): JQueryOf<HTMLDivElement>;
siblings(selector: "dl"): JQueryOf<HTMLDListElement>;
siblings(selector: "embed"): JQueryOf<HTMLEmbedElement>;
siblings(selector: "fieldset"): JQueryOf<HTMLFieldSetElement>;
siblings(selector: "font"): JQueryOf<HTMLFontElement>;
siblings(selector: "form"): JQueryOf<HTMLFormElement>;
siblings(selector: "frame"): JQueryOf<HTMLFrameElement>;
siblings(selector: "frameset"): JQueryOf<HTMLFrameSetElement>;
siblings(selector: "h1"): JQueryOf<HTMLHeadingElement>;
siblings(selector: "h2"): JQueryOf<HTMLHeadingElement>;
siblings(selector: "h3"): JQueryOf<HTMLHeadingElement>;
siblings(selector: "h4"): JQueryOf<HTMLHeadingElement>;
siblings(selector: "h5"): JQueryOf<HTMLHeadingElement>;
siblings(selector: "h6"): JQueryOf<HTMLHeadingElement>;
siblings(selector: "head"): JQueryOf<HTMLHeadElement>;
siblings(selector: "hr"): JQueryOf<HTMLHRElement>;
siblings(selector: "html"): JQueryOf<HTMLHtmlElement>;
siblings(selector: "iframe"): JQueryOf<HTMLIFrameElement>;
siblings(selector: "img"): JQueryOf<HTMLImageElement>;
siblings(selector: "input"): JQueryOf<HTMLInputElement>;
siblings(selector: "ins"): JQueryOf<HTMLModElement>;
siblings(selector: "label"): JQueryOf<HTMLLabelElement>;
siblings(selector: "legend"): JQueryOf<HTMLLegendElement>;
siblings(selector: "li"): JQueryOf<HTMLLIElement>;
siblings(selector: "link"): JQueryOf<HTMLLinkElement>;
siblings(selector: "listing"): JQueryOf<HTMLPreElement>;
siblings(selector: "map"): JQueryOf<HTMLMapElement>;
siblings(selector: "marquee"): JQueryOf<HTMLMarqueeElement>;
siblings(selector: "menu"): JQueryOf<HTMLMenuElement>;
siblings(selector: "meta"): JQueryOf<HTMLMetaElement>;
siblings(selector: "meter"): JQueryOf<HTMLMeterElement>;
siblings(selector: "object"): JQueryOf<HTMLObjectElement>;
siblings(selector: "ol"): JQueryOf<HTMLOListElement>;
siblings(selector: "optgroup"): JQueryOf<HTMLOptGroupElement>;
siblings(selector: "option"): JQueryOf<HTMLOptionElement>;
siblings(selector: "p"): JQueryOf<HTMLParagraphElement>;
siblings(selector: "param"): JQueryOf<HTMLParamElement>;
siblings(selector: "picture"): JQueryOf<HTMLPictureElement>;
siblings(selector: "pre"): JQueryOf<HTMLPreElement>;
siblings(selector: "progress"): JQueryOf<HTMLProgressElement>;
siblings(selector: "q"): JQueryOf<HTMLQuoteElement>;
siblings(selector: "script"): JQueryOf<HTMLScriptElement>;
siblings(selector: "select"): JQueryOf<HTMLSelectElement>;
siblings(selector: "source"): JQueryOf<HTMLSourceElement>;
siblings(selector: "span"): JQueryOf<HTMLSpanElement>;
siblings(selector: "style"): JQueryOf<HTMLStyleElement>;
siblings(selector: "table"): JQueryOf<HTMLTableElement>;
siblings(selector: "tbody"): JQueryOf<HTMLTableSectionElement>;
siblings(selector: "td"): JQueryOf<HTMLTableDataCellElement>;
siblings(selector: "template"): JQueryOf<HTMLTemplateElement>;
siblings(selector: "textarea"): JQueryOf<HTMLTextAreaElement>;
siblings(selector: "tfoot"): JQueryOf<HTMLTableSectionElement>;
siblings(selector: "th"): JQueryOf<HTMLTableHeaderCellElement>;
siblings(selector: "thead"): JQueryOf<HTMLTableSectionElement>;
siblings(selector: "title"): JQueryOf<HTMLTitleElement>;
siblings(selector: "tr"): JQueryOf<HTMLTableRowElement>;
siblings(selector: "track"): JQueryOf<HTMLTrackElement>;
siblings(selector: "ul"): JQueryOf<HTMLUListElement>;
siblings(selector: "video"): JQueryOf<HTMLVideoElement>;
siblings(selector: "xmp"): JQueryOf<HTMLPreElement>;
}
interface JQueryStatic {
(selector: "a", context?: Element | JQuery): JQueryOf<HTMLAnchorElement>;
(selector: "applet", context?: Element | JQuery): JQueryOf<HTMLAppletElement>;
(selector: "area", context?: Element | JQuery): JQueryOf<HTMLAreaElement>;
(selector: "audio", context?: Element | JQuery): JQueryOf<HTMLAudioElement>;
(selector: "base", context?: Element | JQuery): JQueryOf<HTMLBaseElement>;
(selector: "basefont", context?: Element | JQuery): JQueryOf<HTMLBaseFontElement>;
(selector: "blockquote", context?: Element | JQuery): JQueryOf<HTMLQuoteElement>;
(selector: "body", context?: Element | JQuery): JQueryOf<HTMLBodyElement>;
(selector: "br", context?: Element | JQuery): JQueryOf<HTMLBRElement>;
(selector: "button", context?: Element | JQuery): JQueryOf<HTMLButtonElement>;
(selector: "canvas", context?: Element | JQuery): JQueryOf<HTMLCanvasElement>;
(selector: "caption", context?: Element | JQuery): JQueryOf<HTMLTableCaptionElement>;
(selector: "col", context?: Element | JQuery): JQueryOf<HTMLTableColElement>;
(selector: "colgroup", context?: Element | JQuery): JQueryOf<HTMLTableColElement>;
(selector: "datalist", context?: Element | JQuery): JQueryOf<HTMLDataListElement>;
(selector: "del", context?: Element | JQuery): JQueryOf<HTMLModElement>;
(selector: "dir", context?: Element | JQuery): JQueryOf<HTMLDirectoryElement>;
(selector: "div", context?: Element | JQuery): JQueryOf<HTMLDivElement>;
(selector: "dl", context?: Element | JQuery): JQueryOf<HTMLDListElement>;
(selector: "embed", context?: Element | JQuery): JQueryOf<HTMLEmbedElement>;
(selector: "fieldset", context?: Element | JQuery): JQueryOf<HTMLFieldSetElement>;
(selector: "font", context?: Element | JQuery): JQueryOf<HTMLFontElement>;
(selector: "form", context?: Element | JQuery): JQueryOf<HTMLFormElement>;
(selector: "frame", context?: Element | JQuery): JQueryOf<HTMLFrameElement>;
(selector: "frameset", context?: Element | JQuery): JQueryOf<HTMLFrameSetElement>;
(selector: "h1", context?: Element | JQuery): JQueryOf<HTMLHeadingElement>;
(selector: "h2", context?: Element | JQuery): JQueryOf<HTMLHeadingElement>;
(selector: "h3", context?: Element | JQuery): JQueryOf<HTMLHeadingElement>;
(selector: "h4", context?: Element | JQuery): JQueryOf<HTMLHeadingElement>;
(selector: "h5", context?: Element | JQuery): JQueryOf<HTMLHeadingElement>;
(selector: "h6", context?: Element | JQuery): JQueryOf<HTMLHeadingElement>;
(selector: "head", context?: Element | JQuery): JQueryOf<HTMLHeadElement>;
(selector: "hr", context?: Element | JQuery): JQueryOf<HTMLHRElement>;
(selector: "html", context?: Element | JQuery): JQueryOf<HTMLHtmlElement>;
(selector: "iframe", context?: Element | JQuery): JQueryOf<HTMLIFrameElement>;
(selector: "img", context?: Element | JQuery): JQueryOf<HTMLImageElement>;
(selector: "input", context?: Element | JQuery): JQueryOf<HTMLInputElement>;
(selector: "ins", context?: Element | JQuery): JQueryOf<HTMLModElement>;
(selector: "label", context?: Element | JQuery): JQueryOf<HTMLLabelElement>;
(selector: "legend", context?: Element | JQuery): JQueryOf<HTMLLegendElement>;
(selector: "li", context?: Element | JQuery): JQueryOf<HTMLLIElement>;
(selector: "link", context?: Element | JQuery): JQueryOf<HTMLLinkElement>;
(selector: "listing", context?: Element | JQuery): JQueryOf<HTMLPreElement>;
(selector: "map", context?: Element | JQuery): JQueryOf<HTMLMapElement>;
(selector: "marquee", context?: Element | JQuery): JQueryOf<HTMLMarqueeElement>;
(selector: "menu", context?: Element | JQuery): JQueryOf<HTMLMenuElement>;
(selector: "meta", context?: Element | JQuery): JQueryOf<HTMLMetaElement>;
(selector: "meter", context?: Element | JQuery): JQueryOf<HTMLMeterElement>;
(selector: "object", context?: Element | JQuery): JQueryOf<HTMLObjectElement>;
(selector: "ol", context?: Element | JQuery): JQueryOf<HTMLOListElement>;
(selector: "optgroup", context?: Element | JQuery): JQueryOf<HTMLOptGroupElement>;
(selector: "option", context?: Element | JQuery): JQueryOf<HTMLOptionElement>;
(selector: "p", context?: Element | JQuery): JQueryOf<HTMLParagraphElement>;
(selector: "param", context?: Element | JQuery): JQueryOf<HTMLParamElement>;
(selector: "picture", context?: Element | JQuery): JQueryOf<HTMLPictureElement>;
(selector: "pre", context?: Element | JQuery): JQueryOf<HTMLPreElement>;
(selector: "progress", context?: Element | JQuery): JQueryOf<HTMLProgressElement>;
(selector: "q", context?: Element | JQuery): JQueryOf<HTMLQuoteElement>;
(selector: "script", context?: Element | JQuery): JQueryOf<HTMLScriptElement>;
(selector: "select", context?: Element | JQuery): JQueryOf<HTMLSelectElement>;
(selector: "source", context?: Element | JQuery): JQueryOf<HTMLSourceElement>;
(selector: "span", context?: Element | JQuery): JQueryOf<HTMLSpanElement>;
(selector: "style", context?: Element | JQuery): JQueryOf<HTMLStyleElement>;
(selector: "table", context?: Element | JQuery): JQueryOf<HTMLTableElement>;
(selector: "tbody", context?: Element | JQuery): JQueryOf<HTMLTableSectionElement>;
(selector: "td", context?: Element | JQuery): JQueryOf<HTMLTableDataCellElement>;
(selector: "template", context?: Element | JQuery): JQueryOf<HTMLTemplateElement>;
(selector: "textarea", context?: Element | JQuery): JQueryOf<HTMLTextAreaElement>;
(selector: "tfoot", context?: Element | JQuery): JQueryOf<HTMLTableSectionElement>;
(selector: "th", context?: Element | JQuery): JQueryOf<HTMLTableHeaderCellElement>;
(selector: "thead", context?: Element | JQuery): JQueryOf<HTMLTableSectionElement>;
(selector: "title", context?: Element | JQuery): JQueryOf<HTMLTitleElement>;
(selector: "tr", context?: Element | JQuery): JQueryOf<HTMLTableRowElement>;
(selector: "track", context?: Element | JQuery): JQueryOf<HTMLTrackElement>;
(selector: "ul", context?: Element | JQuery): JQueryOf<HTMLUListElement>;
(selector: "video", context?: Element | JQuery): JQueryOf<HTMLVideoElement>;
(selector: "xmp", context?: Element | JQuery): JQueryOf<HTMLPreElement>;
<T extends HTMLElement>(element: T): JQueryOf<T>;
<T extends HTMLElement>(elements: T[]): JQueryOf<T>;
<T extends HTMLElement>(elements: HTMLCollectionOf<T>): JQueryOf<T>;
<T extends HTMLElement>(elements: NodeListOf<T>): JQueryOf<T>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment