@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>).Optional
ownerDocument_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.Accepts a string containing a CSS selector which is then used to match a set of elements.
A string containing a selector expression
Optional
context: string | Element | Document | JQuery<HTMLElement>A DOM Element, Document, Selector or jQuery to use as context
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery demo</title>
<script src="https://code.jquery.com/jquery-3.3.1.js"></script>
</head>
<body>
<p>one</p>
<div><p>two</p></div>
<p>three</p>
<script>
$( "div > p" ).css( "border", "1px solid gray" );
</script>
</body>
</html>
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.
Creates DOM elements on the fly from the provided string of raw HTML.