Search code examples
jqueryjquery-mobilehtml-listsdynamic-html

jquery mobile: dynamic list not shown


This is my script: http://clouderize.it/demo/

First I ask how many items does it has to create: minimum 6.

After I ask the name of the item and after submitting, the relative li elements are added to the ul element.

The problem is that the html code is correctly added to the page, but it doesn't appear on the page.

my jsfiddle: http://jsfiddle.net/michelejs/PeS2D/559/

What am I missing?


Solution

  • Just you need to refresh the listview:

      $("#sortable").listview();
      $("#sortable").listview("refresh");
    

    Try inserting both lines, for creating the listview and then to refresh it and showing the elements.

    EDIT The problem is with the display property of the div:

       $('.thirdStep').css('display', 'block');
    

    instead of:

        $('.thirdStep').page();
        $('.thirdStep').show();