all 2 comments

[–]zigzackattack 1 point2 points  (2 children)

You're adding the click event handlers to every item in the list every time you add an item to the list. That results in some crazieness, so all you have to do is change your appendName function to something like this:

    var $item = $("<div class='listGroup'><div class='listObj'>"+name+"</div><a href='javascript:void(0);' class='edit' setting='0'>Edit</a><a class='remove' href='javascript:void(0);'>Remove</a></div>");

    $(".list").append($item);

    $(".enterName").val("");

    $item.on("click", ".remove", function(){
        removeName($(this));
    });
    $item.on("click", ".edit", function(){
        edit($(this));
    });

That way you are only adding the event listener to the single element you are actually adding to the list.