在动态加载jquery移动可折叠内容时销毁缓存

时间:2014-06-22 01:50:23

标签: javascript jquery html css jquery-mobile

我正在动态加载jquery mobile可折叠的内容,并且想要在内容加载时显示加载图像,一旦点击其他列表,前一个要关闭并想要销毁其缓存,以便再次点击它显示我正在加载可折叠的随机内容。

以下是我用于在可折叠中动态加载内容的代码:

 <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

更新

$('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();
});

0 个答案:

没有答案