加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Dynamic Content Loading

发布时间:2020-12-16 21:35:02 所属栏目:百科 来源:网络整理
导读:Partial Update Using dojox/mobile/ContentPane In this example,there is a dojox/mobile/ContentPane widget in the transition target view. dojox/mobile/ContentPane is a very simple container widget,so it can be thought of as a div with the “

Partial Update Using dojox/mobile/ContentPane

In this example,there is a dojox/mobile/ContentPane widget in the transition target view. dojox/mobile/ContentPane is a very simple container widget,so it can be thought of as a <div> with the “href” attribute. This example updates the ContentPane with an external html fragment,and then performs a transition.
myAction6 = function(){
var pane1 = registry.byId("pane1");
if(!pane1.domNode.innerHTML){ // nothing has been loaded yet
connect.connect(pane1,"onLoad",this,function(){
// onLoad fires when the content is ready
this.transitionTo("view6");
});
pane1.set("href","fragment1.html");
}else{
this.transitionTo("view6");
}
}
<div id="view6" data-dojo-type="dojox/mobile/ScrollableView">
<h1 data-dojo-type="dojox/mobile/Heading" data-dojo-props='back:"Home",moveTo:"home",fixed:"top"'>Partial Update</h1>
<h2 data-dojo-type="dojox/mobile/RoundRectCategory">Dynamic Content</h2>
<div id="pane1" data-dojo-type="dojox/mobile/ContentPane"></div>
<ul data-dojo-type="dojox/mobile/RoundRectList">
<li data-dojo-type="dojox/mobile/ListItem" data-dojo-props='moveTo:"home",transitionDir:-1'>
Home
</li>
</ul>
</div>

转自:http://dojotoolkit.org/reference-guide/1.9/dojox/mobile/dynamic-content-loading.html#dynamic-content-loading

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读