Solution to Wednesday’s homework: MegaRoster with delete and promote
megaRoster.addChild
calls this.buildListItem
)this
with bind
currentTarget
: The object on which the event occurredparentElement
childNodes
firstChild
firstElementChild
insertBefore
Presentations have been converted from their original format to play in web browsers.
Enhance MegaRoster! Make the students editable, and add the ability to move them around in the list.
Add a link that moves the student to the top of the list. Either change the behavior of the existing promote link, or add a new top link.
Add links to move the student up and down the list, one spot at a time.
Disable the up link when the student reaches the top, and disable the down link when the student reaches the bottom.
Make the student name editable in place after it’s added to the roster.
Make the student data persistent between page refreshes! That is, keep the students from disappearing every time the page is refreshed.
Hint: Use
localStorage
.Update: Solution: Editable MegaRoster