Well, to begin with.
This:
$('demolist').on('click', function(){
Should be this:
$('.demolist').on('click', function(){ //note the dot referring to a class
For dynamically added elements, you might however need to delegate them doing something like this. Reference: http://api.jquery.com/on/
$('.dropdown-menu').on('click','.demolist', function() {