item.append($('<span class="description">').text(data.description || ''));
item.append($('<span class="edit-trigger">').text('…'));
- $('#list-items').append(item).addClass('have-list-items');
+ $('#list-items').append(item);
+ $('#list-contents').addClass('have-list-items');
}
function got_lists_version(new_version) {
if (new_version != lists_version)
// keep track of the last existing item, and append new one
// after it, prepending if there is no last existing item
// the newly prepended/inserted item becomes the last existing
- var item_list = $('#list-items').empty().removeClass('have-list-items');
+ $('#list-contents').removeClass('have-list-items');
+ var item_list = $('#list-items').empty();
$.each(item_data.items, (i,item) => {
add_list_item(item);