开发者

Jquery Mobile - Update List Row containing images, text !

开发者 https://www.devze.com 2023-03-07 23:48 出处:网络
I am new to Jquery! I am trying to load a list dynamically, without the page being refreshed. I will be getting data(parsed) from an array which i have to load in the list dynamically.

I am new to Jquery!

I am trying to load a list dynamically, without the page being refreshed. I will be getting data(parsed) from an array which i have to load in the list dynamically.

Its basically a contact list with Chat icon, Username, Presence or status, and Custom message which are part 开发者_高级运维of the list.

Kindly share any code snippet or example which would help me in accomplishing this task quickly

Tx !


Well, make the ajax call, update the html, then call refresh() on the list per the docs. That would be the first thing I would try.

Updating lists

If you add items to a listview, you'll need to call the refresh() method on it to update the styles and create any nested lists that are added. For example, $('ul').listview('refresh');

We're currently working on a few improvements to the refresh method, so keep your eye on Github for updates.
http://jquerymobile.com/demos/1.0a4.1/docs/lists/docs-lists.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号