最新版本号[免费下载]

升级appframework3以后怎么给Panel绑定数据?

作者:本站编辑 发布时间:2015-11-25 来源:本站原创 点击数:

用data-load触发函数var bangdan_list='';                                $.jsonP({                                        url: 'http://www.phonegap100.com/appapi.php?a=getThreadList&fid=2&page=1&callback=?',                                        success: function(data) {                                                                                                var rel=data.result                                                //panel                                                                                for (var i = 0; i < rel.length; i++) {                                                        bangdan_list+='<li><a href="#">'+rel[i].subject+'</a></li>';                                                }                                                $("#bangdan_list").html(bangdan_list);                                                                                        }                                });   
准确代码如下:
$(document).bind("panelload",function(e){
   var $el=$(e.target);
   
   if($el.attr("data-header").length>0)
   {
      //hide other header and show this one
   }
});
<div class="panel" data-header="header2"></div>
<header id="header2">Header 2</header>


本文责任编辑: 加入会员收藏夹 点此参与评论>>
复制本网址-发给QQ/微信上的朋友
AI智能听书
选取音色