jQuery Mobile rendering problems with content being added after the page is initialized

后端 未结 11 1977
清酒与你
清酒与你 2020-12-14 18:54

I\'m using jQuery Mobile and Backbone JS for a project. It\'s mostly working, using jQuery Mobile\'s event \'pagebeforeshow\' to trigger the correct Backbone View. In the Ba

11条回答
  •  隐瞒了意图╮
    2020-12-14 19:26

    I needed a way to dynamically refresh a JQM page after it had been initialized. I found that if I removed the data attribute "page" during the "pagehide" event, the next time the JQM page was displayed it was re-initialzed.

    $('#testing').live('pagehide', function (e) {
        $.removeData(e.target, 'page');
    }); 
    

提交回复
热议问题