Back

.html( [htmlString] )

Get or set the HTML contents of the current set

If htmlString is provided, this will set the contents of each element and return the current set for chaining

If no argument is passed, this will return the contents of the first element in the current set

Params

htmlString{HTMLString} [optional]A string of HTML markup to be created and inserted

Returns

HTMLString or DollarJS (chainable)

Examples

$('p').html()
$('p').html('<div>')