jqmobi3.0中如果要使用data-load data-unload怎么用
As to the data-load/data-unload properties.They have been removed.Use the events instead http://app-framework-software.intel.com/30/documentation.php#afui/afui_events在jqmobi3.0中 我们去掉了data-load/data-unload 属性,如果想继续用 以前的 data-load/data-unload可以复制一下代码放到您的程序中
They are renamed, and there is now "before" events too.If you liked the old way, you could always write a plugin to enable it.
<code>//psuedo code
var dispatchPanelEvent:function(fnc,myPanel){
if (typeof fnc === "string" && window) {
return window(myPanel);
}
else if(fnc.indexOf(".")!==-1){
var scope=window,items=fnc.split("."),len=items.length,i=0;
for(i;i<len-1;i++){
scope=scope];
if(scope===undefined) return;
}
return scope](myPanel);
}
};
$(document).on("panelload",function(e){
var hasLoad=$(e.target).attr("data-load");
return dispatchPanelEvent(hasLoad,e.target);
})
$(document).on("panelunload",function(e){
var hasLoad=$(e.target).attr("data-unload");
return dispatchPanelEvent(hasLoad,e.target);
})</code>
这段放那里了我放index 还是不行 本帖最后由 xpoqx 于 2014-10-28 13:55 编辑
3.0 都出了???
下载还是2.1?
xpoqx 发表于 2014-10-28 13:52
3.0 都出了???
临时下载地址 http://app-framework-software.intel.com/30/ 等正式版出了 再看看 不行 报错,fnc is undefined
页:
[1]