且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

动态添加内容到面板

更新时间:2023-12-06 10:54:16

向面板添加新内容后,使用

After adding new content to Panel, use

$('[data-role=page]').trigger('pagecreate');

演示

Demo

注释:

  • 使用.listview("refresh").listview().listview("refresh")不能正确增强列表视图,因为它将与其父div合并,而不是将其呈现为附加了div的子级.

  • Using .listview("refresh") and .listview().listview("refresh") won't enhance list-view correctly as it will merge it with its parent div instead of render it as a child of the div where it's appended.

updatelayout.

在jQuery Mobile 1.3.1中使用jQuery 1.9.1

Use jQuery 1.9.1 with jQuery Mobile 1.3.1

相关: 查看全文