jQuery Mobile 导航到备用 aspx
我正在移植 jQtouch 应用程序以使用 JQMobile。大部分内容进展顺利,但有一些地方我遇到了问题。
1)在JqTouch中,我用来
$("#approveRequests").bind('pageAnimationEnd', function () { getRequestList(); return false; });
在显示特定页面(单个html文档中的div)时加载数据。我无法让该事件正常工作,因此我决定将标记从单个 index.aspx 文档移动到较小的单独文档中。
我尝试将其更改为:
$("#approveRequests").live('pageShow', testMethod);
但该事件似乎在页面加载时立即触发,而不是在显示 div 时触发
2) 将其中一个 div 的标记移动到单独的页面后,我无法让应用程序导航到它。它只是弹出一个加载对话框,从不执行任何操作。
以下是创建菜单的标记:
<div data-role="content">
<a href="RequestsMaster.aspx" data-role="button">Requests</a>
<a href="#invoices"
data-role="button">Invoices</a> <a href="#expenses" data-role="button">Expenses</a>
<a href="#timesheets" data-role="button">Timesheets</a>
<a href="#holidays" data-role="button">
Holidays</a> <a href="#about" data-role="button">About</a>
<a href="#logout" data-role="button"
data-theme="e" button-icon="delete">Log out</a>
</div>
我遇到问题的行是:
<a href="RequestsMaster.aspx" data-role="button">Requests</a>
该页面与 Index.aspx 位于同一文件夹中
还有其他您需要知道的吗?
这就是它被卡住的地方
I am porting a jQtouch app to use JQMobile instead. Most of it is moving across fine but there are a couple of bits im having a problem with.
1) in JqTouch i was using
$("#approveRequests").bind('pageAnimationEnd', function () { getRequestList(); return false; });
to load data when a particular page ( a div in a single html document ) is displayed. I could not get the event working so I decided to move markup from my single index.aspx document into smaller seperate documents.
I tried changing this to:
$("#approveRequests").live('pageShow', testMethod);
but the event seems to fire as soon as the page loads rather than when the div is displayed
2) after moving the markup for one of the divs in to a seperate page I cant get the app to navigate to it. It just pops up a loading dialog and never does anything.
Here is the markup to create the menu:
<div data-role="content">
<a href="RequestsMaster.aspx" data-role="button">Requests</a>
<a href="#invoices"
data-role="button">Invoices</a> <a href="#expenses" data-role="button">Expenses</a>
<a href="#timesheets" data-role="button">Timesheets</a>
<a href="#holidays" data-role="button">
Holidays</a> <a href="#about" data-role="button">About</a>
<a href="#logout" data-role="button"
data-theme="e" button-icon="delete">Log out</a>
</div>
The line im having the problem with is :
<a href="RequestsMaster.aspx" data-role="button">Requests</a>
The page is in the same folder as the Index.aspx
Is there anything else you need to know?
This is where its stuck
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这似乎是子页面标记的问题。还不确定具体是什么。设法让它更改页面,但现在子页面上没有样式
This seemed to be a problem with the markup of the child page. Not sure exactly what yet. Managed to get it to change page but now there is no styling on the child page