我有2頁使用swipeleft和swiperight事件(來回)鏈接,但是當我滑動到其他頁面時,jquery不會觸發pageinit事件,並且只剩下標題和頁腳。我應該使用changePage事件還是應該使用loadPage事件?我知道在其他版本的jquerymobile中有一個錯誤,pageinit事件不會觸發,但我已經使用已經解決了它的RC1,但事件仍然沒有觸發。什麼阻止它開火?提前致謝。jquery pageinit沒有射擊
守則如下:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>esports</title>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" />
<link rel="stylesheet" href="jquery.zrssfeed.css" />
</script>
<style>
</style>
</head>
<body>
<!-- index -->
<div data-role="page" id="index">
<div data-role="header">
<h1>esports times</h1>
</div>
<!--/header-->
<div data-role="content" id="content">
<div id="currentFeed">teamliquid. skgamin</div>
<ul id="rssFeed" data-role="listview">
</ul>
</div>
</div>
</body>
</html>
<!-- load javscripts here-->
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.js"> </script>
<script src="jquery.zrssfeed.js"></script>
<script>
$('#index').bind("pageinit", (function() {
$('#rssFeed').rssfeed('http://feeds.reuters.com/reuters/oddlyEnoughNews', {
limit: 10,
date: false,
});
}));
$('#index').bind("swipeleft", function() {
$.mobile.changePage("teamliquid.html", "slide", true, false);
});
</script>
<!-- /javascript-->
這可能是我正在尋找,但只是意識到,Windows Phone 7手機差距不支持刷卡事件。 :(謝謝你的幫助,非常感謝。 – 2012-03-29 18:46:02