Added line of code to append sublist to newLinksLi.
Refactored click events to jQuery.