jQuery Mobile Page refresh mechanism

前端 未结 6 1184
小鲜肉
小鲜肉 2020-11-30 02:23

I\'m having a lot of pain understanding how jQuery Mobile handles pages refresh after an ajax update.

I\'m having a two pages - unique file site: a search engine.

6条回答
  •  忘掉有多难
    2020-11-30 02:38

    I posted that in jQuery forums (I hope it can help):

    Diving into the jQM code i've found this solution. I hope it can help other people:

    To refresh a dynamically modified page:

    function refreshPage(page){
        // Page refresh
        page.trigger('pagecreate');
        page.listview('refresh');
    }
    

    It works even if you create new headers, navbars or footers. I've tested it with jQM 1.0.1.

提交回复
热议问题