Q:

jQuery UI LISTVIEW not refreshing

Using jQuery UI (w/ jquery 1.9.1).  I have a sortable list.  I'm adding dom element through a form.  User clicks a button, a dialog appears.  User types text into a textbox and clicks 'add page'.  A new list item will append to the list.  The problem is that the listview does not contain the proper CSS. 
Heres a JSfiddle --> http://jsfiddle.net/RQKng/1/
Before you Click the red button you can click between the list items and notice the selected list item turns blue.  However, any new items will not turn blue.  
I tried:
$('#pageList ul').trigger('create').listview('refresh');

But I recieve an error that 'Object has not method "listview" '

A:

1: The problem is on this line : 
$('.page').click(function() {
        $('.page').removeClass('selected');
        $(this).addClass('selected');
    });

2: The solution is here : jsFiddle
3: some explanation:
Because you have dynamic elements that are not know beforehand, you must make jQuery aware of that.  from jQuery docs: 

Event handlers are bound only to the currently selected elements; they
  must exist on the page at the time your code makes the call to .on(). 

What you want is this: 
Delegated events have the advantage that they can process events from descendant 
elements that are added to the document at a later time.  

Solution: 
$('.item-list').on("click","li",function() {
    $('.page').removeClass('selected');
    $(this).addClass('selected');
});

