If you use your Developer Tools, you will see that the content is actually being loaded into the 'dropdowns' ( I think they're officially called 'Collapsible Lists' ) But I think that what's happening is that the lists aren't being properly 're-initialized' when they are being injected into the DOM. Check out this post or this post for some help with
.trigger('create');
I looked at your code and I think you'll want that in your getData()
function. something like this:
$('#'+id+'items').append(elems);
becomes
$('#'+id+'items').append(elems).trigger('create');
Not sure I followed everything correctly, but it looks like that is where you are actually 'pushing' the Collapsible List to the browser.
EDIT:
To just update the whole page, you could do something like this:
$("div[data-role='content']").trigger("create").trigger( 'updatelayout' );