Let your HTML code look like this:
<ul id="contacts" data-role="listview" data-divider-theme="b" data-inset="true">
<li data-role="list-divider" role="heading">
List view
</li>
</ul>
and instead of this jQuery line:
$("#contacts").html(items);
use this one:
$("#contacts").append(items);
This way a header will be in a listview before you start populating it and append function will add new content inside a listview without removing previous one.