diff --git a/www/content/attributes/hx-swap.md b/www/content/attributes/hx-swap.md index 8b18a5ee..26972143 100644 --- a/www/content/attributes/hx-swap.md +++ b/www/content/attributes/hx-swap.md @@ -128,12 +128,27 @@ You may also use `window:top` and `window:bottom` to scroll to the top and botto ```html -
Get Some Content
``` +#### Unwrapping: `strip` + +The `strip` modifier allows you to control whether the outer element of the response content should be removed before swapping. This is useful when you want to swap only the children of the response's root element. + +If the server response is: +```html +
+

Content 1

+

Content 2

+
+``` + +With `strip:true`, only the `

` elements are swapped in. +With `strip:false`, the entire `

` and its contents are swapped in. + ## Notes * The default value of this attribute is `innerHTML`