2013-03-28 46 views
1

我是新手机差距发展,如何使用jQuery.I使用这个$ .mobile.changePage(“activity.html”,{transition:“slideup” });为了过渡,但它不工作。任何人都可以指引我如何做到这一点。转换到另一页Phonegap iPhone

在此先感谢。

+0

hii我也面临过渡问题PLZ帮我解决这个问题。提前致谢。 – anilkumar07 2013-05-31 09:58:15

回答

0

这是jQuery手机。你需要包括jQuery和jQuery的移动JavaScript来使它工作。

不要忘记也包括相应的jquery mobile css!

看看文档中的例子,如果你需要进一步的参考。

实施例:

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.css" /> 
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> 
<script src="http://code.jquery.com/mobile/1.3.0/jquery.mobile-1.3.0.min.js"></script> 
+0

感谢您的回复,我已经包括了一切,我的问题是在转换,当点击按钮下一个屏幕出现和fade.Any解决方案,正在开发iPhone手机差距应用程序。 – Mage 2013-03-30 03:28:16

2

jQuery基本上代表使用divs单个.html文件内页。而changePage使用jQuery Mobile AJAX功能,如果你真的想导航到其他的,你可以使用基本的javascript

window.location.href="your-new-page.html"; 

$.mobile.changePage("second-page.html", { transition: "slideup"}); 

要浏览的页面采用div创建可以使用

$.mobile.changePage("#pageHome", { transition: "slideup"}); 

#pageHome - 页面DIV的ID。

您可以参考以下链接太

Link 1

Link 2

我希望它能帮助。

+0

好吧我会试试这个.. – Mage 2013-03-30 03:28:48

+0

你也可以使用changePage导航到其他html页面。但它只会加载第一个div。您可以使用rel =“external”进行链接,以便打开一个新页面。 – wmfairuz 2013-03-30 09:17:37