ui class not working at second loading page | PhoneGap x jquerymobile

・ページキャッシュが利用されるとき? ui class が反映されなかった。
一度目は大丈夫だけど、戻る→進むで表示するとclassが反映されない。
生成したDOMに、jquerymobileが ui-クラスをつけてくれるタイミングがわからない。

http://jquerymobile.com/demos/1.0.1/docs/lists/docs-lists.html

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:

$(‘#mylist’).listview(‘refresh’);

これでいけるみたいだけど、listview()がありませんといわれる。
changepageしたあとに
$(‘ul#list-result’).listview(‘refresh’);
で大丈夫でした。タイミングが難しいですね。

.page() functionを呼ぶ方法もありそうです。

This entry was posted on 金曜日, 2月 3rd, 2012 at 9:53 PM and is filed under jquery mobile, PhoneGap. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。