Skip to the content.

.html()

Sets or retrieves the HTML within each item in the collection

Usage

const html = $(selector).html();
$(selector).html(html);

html

A selector, HTML string, Node, array of Nodes, Dabby collection or a callback function, to insert as HTML into each of the items in the collection.

Returns

The original Dabby collection when setting HTML, or string containing the HTML from the first item in the collection.

Differences to jQuery

None.