I’m trying to traverse a ul that has been appended to before traversing like so:
var items = [];
$('#list').append('<li id="item_10">item 10</li>');
$('#list').each(function () {
var item = $(this).attr('id');
items.push(item);
});
alert(items.toString());
But when I alert the output I don’t see the item I added. Anyone have a clue on how I can add to a list then traverse it?
You are looping over the
ulparent. Probably want something liketo loop over the
linodes.