2014-10-05 56 views
0

我正在測試以下代碼以從w3schools打開一個面板。它可以在筆記本電腦上正常工作,但是當我將它加載到Android Note 3設備上時,當您觸摸打開面板鏈接時,面板不顯示任何內容!請幫忙嗎? 思南jQuery Mobile - 鏈接不起作用

<!DOCTYPE html> 
<html> 
<head> 
<meta name="viewport" content="width=device-width, initial-scale=1"> 
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.css"> 
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script> 
<script src="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.js"></script> 
</head> 
<body> 

<div data-role="page" id="pageone"> 
    <div data-role="panel" id="myPanel"> 
    <h2>Panel Header</h2> 
    <p>You can close the panel by clicking outside the panel, pressing the Esc key or by swiping.</p> 
    </div> 

    <div data-role="header"> 
    <h1>Page Header</h1> 
    </div> 

    <div data-role="main" class="ui-content"> 
    <p>Click on the button below to open the Panel.</p> 
    <a href="#myPanel" class="ui-btn ui-btn-inline ui-corner-all ui-shadow">Open Panel</a> 
    </div> 

    <div data-role="footer"> 
    <h1>Page Footer</h1> 
    </div> 
</div> 

</body> 
</html> 
+0

你使用的是webview嗎?如果不是這不是一個Android問題,請將您的標籤正確。 – VM4 2014-10-05 08:33:17

+0

我正在使用Phonegap生成要加載到Android設備上的apk文件。將標籤更改爲jQuery。 – Simon 2014-10-05 08:39:35

回答

0

還有就是你開了設備您的應用程序,而無需在其互聯網連接的可能性。我說的是因爲你已經使用了一些位於jquery回購庫中的庫。嘗試使用互聯網連接,或者直接下載並鏈接並查看。

+0

謝謝anupam。該設備已連接到Internet。 – Simon 2014-10-05 08:55:38

+0

anupam:我採取了你的建議,在本地下載文件,它工作得很好。非常感謝。 – Simon 2014-10-05 09:21:07