There are no tracking or monitoring cookies on this site. There are only cookies used for documentation examples related to cookies.
Close

Processing...
This may take a few seconds.

empty

Syntax

empty: (selector) [every (time)] [after (time)][, (empty)...];

selector = A CSS selector referencing an element or set of elements that you want to remove the contents of, ie. remove the inner HTML.

This command removes the inner HTML from an element or set of elements.

It is a shorthand method of emptying an area of HTML.

For example, instead of doing this:

#myButton:click {
.myDiv {
render: "";
}
#AnotherDiv {
render: "";
}
}

With the empty command, you can do this instead, which does the same thing:

#myButton:click {
empty: .myDiv, #AnotherDiv;
}

 

empty