Created
March 6, 2018 18:24
-
-
Save bmease/05ee3ab50452ac789ed09f3151f3511b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function appendLists(el) { | |
const boardId = el.value | |
// skip boards with no lists | |
if (!lists[boardId]) { return } | |
// create a new ul | |
let ul = document.createElement('ul') | |
// append all the list li's to the new ul | |
lists[boardId].forEach(li => ul.appendChild(li)) | |
// append the new ul to the boards li | |
el.closest('li').appendChild(ul) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment