Dynamically adding
  • to
      in jquery mobile
  • 前端 未结 5 1879
    太阳男子
    太阳男子 2020-12-02 16:43

    I\'m trying to add list items to unordered lists in jquery mobile, but the formatting doesn\'t seem to be created properly.

    5条回答
    •  悲哀的现实
      2020-12-02 17:46

      The answers provided turned out to be a little bit messy...

      $('ul').append('

    • hello
    • '); is ok, but it needs to refresh the listview, so all you need is:

      $('ul').append('
    • hello
    • ').listview('refresh');

    提交回复
    热议问题