确定活动面板 [英] Determine Active Panel
本文介绍了确定活动面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在做一个电话缺口项目.
I'm on a phonegap project.
我使用JQMobi(新名称是Intel的App Framework)来完成我的项目.
I do my project with JQMobi (new name is Intel's App Framework)..
在这个项目上,我想确定可见/活动面板以根据其启动我的功能.
On this project i want to determine the visible/active panel to startup my functions according to it.
这是我尝试过的;
$(document).bind('pageshow', function () {
var id = $.ui.activeDiv[0].id;
if ($.ui.activeDiv[0].id=="contents01"){
getLive();
}
});
function getLive(){
alert('on live page!');
}
我如何在jqmobi/app框架中做到这一点?
how can i do this in jqmobi/app framework ?
我在jquery mobile中使用了它,并且可以正常工作.
i used this in jquery mobile and it was working.
$(document).bind('pageshow', function () {
var id = $.mobile.activePage[0].id;
if (id=="home"){
getHomePage();
}
else.....
等待您的答案.
谢谢.
推荐答案
或者您可以这样做
$.ui.activeDiv.id == "contents01";
这篇关于确定活动面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文