| OLD | NEW |
| (Empty) |
| 1 --- | |
| 2 layout: default | |
| 3 title: Moving Elements within the DOM Tree | |
| 4 live_example_url: /docs/tutorials/add-elements/examples/anagram/anagram.html"> | |
| 5 header: | |
| 6 css: ["/samples/samples.css"] | |
| 7 --- | |
| 8 | |
| 9 ## {{ page.title }} | |
| 10 | |
| 11 Form a word by clicking the letter tiles. | |
| 12 | |
| 13 This app shows how to programmatically move an element on the page. | |
| 14 | |
| 15 To move an element on the page, change its parent element. An element can have | |
| 16 only one parent, so changing the parent moves the element in the DOM tree. In | |
| 17 this example, when you click on a tile, the click handler changes the tile’s | |
| 18 parent. | |
| 19 | |
| 20 Read this [tutorial](/docs/tutorials/add-elements/#moving-elements) for | |
| 21 more detail, or read the | |
| 22 [source](https://github.com/dart-lang/dart-tutorials-samples/tree/master/anagram
). | |
| 23 | |
| 24 <iframe class="running-app-frame" | |
| 25 style="height:400px;width:100%;" | |
| 26 src="{{page.live_example_url}}"> | |
| 27 </iframe> | |
| 28 | |
| 29 See all [samples](/samples/). | |
| OLD | NEW |