diff --git a/docs/create-modify-element.mdx b/docs/create-modify-element.mdx index ed6b5cf..19e973c 100644 --- a/docs/create-modify-element.mdx +++ b/docs/create-modify-element.mdx @@ -29,7 +29,7 @@ document.querySelector(".not-found"); // null ``` - + Besides Document, this method is also available on Element and DocumentFragment.
If you want to look within a specific element, just use ele.querySelector() on the parent element.
If you want to look within a specific fragment, just use df.querySelector() on the parent fragment. @@ -65,18 +65,7 @@ for (let p of paras) { } ``` - - - Besides Document, this method is also available on Element and DocumentFragment.
- If you want to look for list of elements within specific element, just use ele.querySelectorAll() on the parent element.
- If you want to look for list of elements within specific fragment, just use df.querySelectorAll() on the parent fragment. - - ```js - // Example - outer is a parent element/fragment. - let innerEles = outer.querySelectorAll(".inner"); - ``` -
-
+`querySelectorAll` is also available on Element and DocumentFragment, in the [same way as querySelector](#element-has-qs).