Creates DOM elements on the fly from the provided string of raw HTML.
@param html
html (ownerDocument) — A string of HTML to create on the fly. Note that this parses HTML, not XML. html (attributes) — A string defining a single, standalone, HTML element (e.g. <div/> or <div></div>).OptionalownerDocument_attributes: Document | PlainObject<any>@param ownerDocument_attributes
ownerDocument — A document in which the new elements will be created. attributes — An object of attributes, events, and methods to call on the newly-created element.$( "<div/>", {
"class": "test",
text: "Click me!",
click: function() {
$( this ).toggleClass( "test" );
}
})
.appendTo( "body" );
Accepts a string containing a CSS selector which is then used to match a set of elements.
A string containing a selector expression
Optionalcontext: string | Element | Document | JQuery<HTMLElement>A DOM Element, Document, Selector or jQuery to use as context
$( "input:radio", document.forms[ 0 ] );
Return a collection of matched elements either found in the DOM based on passed argument(s) or created by passing an HTML string.
A DOM element to wrap in a jQuery object.
Binds a function to be executed when the DOM has finished loading.
The function to execute when the DOM is ready.
jQuery(function( $ ) {
// Your code using failsafe $ alias here...
});
Static helpers injected by
jquery-modalwhen the modal dialog plugin is loaded.