mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-19 05:03:32 +08:00
@@ -2511,10 +2511,10 @@ function test_jQuery() {
|
||||
$foo.triggerHandler('eventName');
|
||||
$("div > p").css("border", "1px solid gray");
|
||||
$("input:radio", document.forms[0]);
|
||||
var xml: any;
|
||||
var xml: any;
|
||||
$("div", xml.responseXML);
|
||||
$(document.body).css("background", "black");
|
||||
var myForm: any;
|
||||
var myForm: any;
|
||||
$(myForm.elements).hide();
|
||||
$('<p id="test">My <em>new</em> text</p>').appendTo('body');
|
||||
$('<img />');
|
||||
@@ -2537,6 +2537,10 @@ function test_jQuery() {
|
||||
}
|
||||
}).appendTo("body");
|
||||
jQuery(function ($) {
|
||||
// Your code using failsafe $ alias here...
|
||||
});
|
||||
jQuery(document).ready(function ($) {
|
||||
// Your code using failsafe $ alias here...
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
22
jquery/jquery.d.ts
vendored
22
jquery/jquery.d.ts
vendored
@@ -725,30 +725,42 @@ interface JQueryStatic {
|
||||
* @param context A DOM Element, Document, or jQuery to use as context
|
||||
*/
|
||||
(selector: string, context?: Element|JQuery): JQuery;
|
||||
|
||||
/**
|
||||
* Accepts a string containing a CSS selector which is then used to match a set of elements.
|
||||
*
|
||||
* @param element A DOM element to wrap in a jQuery object.
|
||||
*/
|
||||
(element: Element): JQuery;
|
||||
|
||||
/**
|
||||
* Accepts a string containing a CSS selector which is then used to match a set of elements.
|
||||
*
|
||||
* @param elementArray An array containing a set of DOM elements to wrap in a jQuery object.
|
||||
*/
|
||||
(elementArray: Element[]): JQuery;
|
||||
|
||||
/**
|
||||
* Binds a function to be executed when the DOM has finished loading.
|
||||
*
|
||||
* @param callback A function to execute after the DOM is ready.
|
||||
*/
|
||||
(callback: (jQueryAlias?: JQueryStatic) => any): JQuery;
|
||||
|
||||
/**
|
||||
* Accepts a string containing a CSS selector which is then used to match a set of elements.
|
||||
*
|
||||
* @param object A plain object to wrap in a jQuery object.
|
||||
*/
|
||||
(object: {}): JQuery;
|
||||
|
||||
/**
|
||||
* Accepts a string containing a CSS selector which is then used to match a set of elements.
|
||||
*
|
||||
* @param object An existing jQuery object to clone.
|
||||
*/
|
||||
(object: JQuery): JQuery;
|
||||
|
||||
/**
|
||||
* Specify a function to execute when the DOM is fully loaded.
|
||||
*/
|
||||
@@ -761,6 +773,7 @@ interface JQueryStatic {
|
||||
* @param ownerDocument A document in which the new elements will be created.
|
||||
*/
|
||||
(html: string, ownerDocument?: Document): JQuery;
|
||||
|
||||
/**
|
||||
* Creates DOM elements on the fly from the provided string of raw HTML.
|
||||
*
|
||||
@@ -769,13 +782,6 @@ interface JQueryStatic {
|
||||
*/
|
||||
(html: string, attributes: Object): JQuery;
|
||||
|
||||
/**
|
||||
* Binds a function to be executed when the DOM has finished loading.
|
||||
*
|
||||
* @param callback A function to execute after the DOM is ready.
|
||||
*/
|
||||
(callback: Function): JQuery;
|
||||
|
||||
/**
|
||||
* Relinquish jQuery's control of the $ variable.
|
||||
*
|
||||
@@ -2352,7 +2358,7 @@ interface JQuery {
|
||||
*
|
||||
* @param handler A function to execute after the DOM is ready.
|
||||
*/
|
||||
ready(handler: Function): JQuery;
|
||||
ready(handler: (jQueryAlias?: JQueryStatic) => any): JQuery;
|
||||
|
||||
/**
|
||||
* Trigger the "resize" event on an element.
|
||||
|
||||
Reference in New Issue
Block a user