イムので必ず行い問題は、私はメインページを持っていることである:。jqueryのは、私が何か間違っ:(をやっているということではない作品のjQueryの新しいhrefのリダイレクト後
<html>
<head>
<title>My Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
<div data-role="header">
<h1>My Title</h1>
</div><!-- /header -->
<div data-role="content">
<a href="pagina2.php">click me</a>
</div><!-- /content -->
これは$(文書)が既にある別のページにリダイレクトされています。問題は、私が手動でページをリフレッシュするまで、 "$(document).ready"がトリガされないということです。その後、すべて正常に動作します。 。
<html>
<head>
<title>My Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
<script type="text/javascript" src="jquery.js"></script>
$(ドキュメント).ready(関数(){$ ( "P")をクリックします(関数(){ $(この).hide(); }); });
<div data-role="header">
<h1>My Title</h1>
</div><!-- /header -->
<div data-role="content">
<p>If you click on me, I will disappear.</p>
<p>Click me away!</p>
<p>Click me too!</p>
</div><!-- /content -->
私は、hrefのwhithoutリダイレクトまたは多分何か間違ったことイムすべき?
のPd:jQueryのモバイル二次ページでは、私のinglishして申し訳ありません:)
ヘッダーには2つの異なるバージョンのJqueryが含まれていますか? 1.3と1.6.4?それは物事をちょっと上手にするかもしれない。 – Dutchie432