| OLD | NEW |
| 1 --- | 1 --- |
| 2 layout: default | 2 layout: default |
| 3 title: "Target 4: Remove DOM Elements" | 3 title: "Remove DOM Elements" |
| 4 description: "Remove a child element from the DOM" | 4 description: "Remove a child element from the DOM" |
| 5 has-permalinks: true | 5 has-permalinks: true |
| 6 tutorial: | 6 tutorial: |
| 7 id: remove-elements | 7 id: remove-elements |
| 8 next: packages | 8 next: shared-pkgs |
| 9 next-title: "Install Shared Packages" | 9 next-title: "Install Shared Packages" |
| 10 prev: add-elements | 10 prev: add-elements |
| 11 prev-title: "Add Elements to the DOM" | 11 prev-title: "Add Elements to the DOM" |
| 12 --- | 12 --- |
| 13 | 13 |
| 14 {% capture whats_the_point %} | 14 {% capture whats_the_point %} |
| 15 | 15 |
| 16 * Use _element_.remove() to remove an element from the DOM. | 16 * Use _element_.remove() to remove an element from the DOM. |
| 17 * Remove all children from an element with _element_.children.clear(). | 17 * Remove all children from an element with _element_.children.clear(). |
| 18 * Function expressions are a convenient way to define single-use functions. | 18 * Function expressions are a convenient way to define single-use functions. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 31 <li> | 31 <li> |
| 32 <a href="https://github.com/dart-lang/dart-tutorials-samples/tree/master/web
/target04/todo_with_delete" | 32 <a href="https://github.com/dart-lang/dart-tutorials-samples/tree/master/web
/target04/todo_with_delete" |
| 33 target="_blank">todo_with_delete</a> | 33 target="_blank">todo_with_delete</a> |
| 34 </li> | 34 </li> |
| 35 </ul> | 35 </ul> |
| 36 | 36 |
| 37 {% endcapture %} | 37 {% endcapture %} |
| 38 | 38 |
| 39 {% capture content %} | 39 {% capture content %} |
| 40 | 40 |
| 41 <div class="tute-target-title"> |
| 42 <h1>{{page.title}}</h1> |
| 43 <h3>Dynamically delete items from the browser page.</h3> |
| 44 </div> |
| 45 |
| 41 This target shows you how to delete elements from the DOM. | 46 This target shows you how to delete elements from the DOM. |
| 42 A new and improved version of the todo app from | 47 A new and improved version of the todo app from |
| 43 [the previous target](/docs/tutorials/add-elements/) | 48 [the previous target](/docs/tutorials/add-elements/) |
| 44 now allows the user to delete items from the list | 49 now allows the user to delete items from the list |
| 45 either one at a time, or all at once. | 50 either one at a time, or all at once. |
| 46 | 51 |
| 47 * [Try the app](#try-app) | 52 * [Try the app](#try-app) |
| 48 * [Changing the appearance when cursor is over an element](#css-hover) | 53 * [Changing the appearance when cursor is over an element](#css-hover) |
| 49 * [Removing an element from the DOM tree](#remove-elem) | 54 * [Removing an element from the DOM tree](#remove-elem) |
| 50 * [Removing all child elements from an element](#remove-all-elem) | 55 * [Removing all child elements from an element](#remove-all-elem) |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 You can find more information about the DOM and CSS in | 235 You can find more information about the DOM and CSS in |
| 231 <a href="/docs/dart-up-and-running/">Dart Up and Running</a>, | 236 <a href="/docs/dart-up-and-running/">Dart Up and Running</a>, |
| 232 which also provides thorough coverage of the Dart language, | 237 which also provides thorough coverage of the Dart language, |
| 233 libraries, and tools. | 238 libraries, and tools. |
| 234 </li> | 239 </li> |
| 235 </ul> | 240 </ul> |
| 236 | 241 |
| 237 {% endcapture %} | 242 {% endcapture %} |
| 238 | 243 |
| 239 {% include tutorial.html %} | 244 {% include tutorial.html %} |
| OLD | NEW |