English 中文(简体)
机动车
原标题:mobile.changePage

我正在设计JQuery移动应用程序,并面临一个问题,即有两页,1.aspx和2.aspx,i必须从第1页转至第2页,目前是使用窗户。 地点。 转方向的红利,但它也显示装货在地址。 为了避免这种情况,希望使用美元。

<<>Problem>:

After coming to page2 i want to execute the code written in Page2 load event,it s working fine with window.location.href,but while using mobile.changePage it is redirecting but load event is not firing,after coming to page2.aspx if i am refreshing the page it is loading, so my problem is while displaying page2.aspx load event has to fire. can anyone tell me why page2.aspx is not loading while using $.mobile.changePage if anyone knows the solution,please reply ASAP,its very urgent. Thanks in advance.

页: 1

Page1.aspx:

    $.mobile.changePage("../Page2.aspx", { transition: "slide", changeHash: true, reverse: false }); 

<>strong>Page2.aspx:

$( div ).live("pageshow", function () 
{  
     $( #lblTest ).text("TestMessage");
}

现在,如果是这样写法的话,那页正在改变,但如果是第2页,则无论哪一部法典没有执行,则在装货时。

这是第二次提出这一问题,请帮助

问题回答

So do you want JQM to load the second page using AJAX or using normal navigation?

In the first case (AJAX), JQM will load the page but will ignore anything that is outside the element (including CSS, scripts, etc..).

在第二起案件中,你需要告诉JQM NOT使用Ajax但确实使用标准导航,然后用新的一页(如正常浏览器一样)。

In terms of events, from their documentation you need to know where to place which code....

如果你没有工作,请提供更长的刀子。





相关问题
jQuery Mobile - Dynamically creating form elements

I m creating a web-database driven offline web-app targeted at iOS devices. I m trying to use jQuery Mobile, but I have a problem in creating the various forms. The form options are taken from a ...

How to use jQuery Mobile to create iPhone Web Apps?

I have been assigned to create a web app for the iPhone, and I was supposed to try jQuery Mobile for developing as it supports many platforms. Is PHP a requirement for creating iPhone web apps? What ...

Change button text jquery mobile

I m using the new jquery mobile 1.0 alpha 1 release to build a mobile app and I need to be able to toggle the text of a button. Toggling the text works fine, but as soon as you perform the text ...

Full width horizontal buttons with jquery mobile?

In Jquery mobile, I can have grouped horizontal buttons, but they the group does not take 100% width. I tried adding a class that sets width:100% but that did not work. How can I do it? Thank you! ...

Difference between jQTouch and jQuery mobile

What is the difference between jQTouch & jQuery Mobile Framework ? Are they related (other than being both based on jQuery) ? Do they have the same goal ? Edit: jQTouch is now jQT

Long Press in JavaScript?

Is it possible to implement "long press" in JavaScript (or jQuery)? How? (source: androinica.com) HTML <a href="" title="">Long press</a> JavaScript $("a").mouseup(function(){ // ...

jQuery and mobile browser compatibility?

I want to build a relatively simple version of my site for mobile phones, but I will definitely need JavaScript and jQuery for many functions. Googling didn t help to find an answer. How is ...

热门标签