开发者

Possible to attach event handler to listview('refresh') in jQuery Mobile?

I have a listview that I'd like to bind a callback to after I call listview('refresh').

In the optimal case I'd love to do something like this:

listviews = $('[data-role="listview"]').live 'refresh', -> Console.log "Listview refresh"

I haven't found anything in the docs that say you can do anything like开发者_Go百科 this, so I was thinking it could be possible to perhaps listen for DOM change events though the only thing I found is an event called DOMNodeInserted but support doesn't seem to be there on every browser.


You refresh the listview yourself, so why not put an additional call in your code like that:

$whatever.listview('refresh').trigger('IrefreshAlistview');
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜