Destroy cache on dynamically loading jquery mobile collapsable content

走远了吗. 提交于 2019-12-25 02:58:21

问题


I am loading content on jquery mobile collapsable dynamically and would like to show loading image while contents are being loaded once clicked on other list the previous one to be closed and want to destroy its cache as well so that if again clicked it shows new content as I am loading random content on collapsable.

Here is my code using for loading content dynamically in collapsable:

 <script>

$('div.info').live('expand', function(){
    var record = $(this).data("record");
 console.log('expanded '+record);
    $(".detail", this).load("get5.php?record="+record);




    });
  </script>

Live link:

UPDATE

$('div.info').live('expand', function(){
    var record = $(this).data("record");
    if (typeof(console.log) == 'function') {
        console.log('expanded'+record);
    }
    $.mobile.loadingMessage = "please wait...";
    $(".detail", this).load("quotesget5.php?record="+record, function(data){
        $("."+info+" ul.check").html(data).listview('refresh');
        $.mobile.showPageLoadingMsg();
    });
}).live('collapse', function () {
    $(this).find('.check').find('li').remove();
});

来源:https://stackoverflow.com/questions/24347464/destroy-cache-on-dynamically-loading-jquery-mobile-collapsable-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!